Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: src/full-codegen.cc

Issue 7152002: Change the representation of catch contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 // that scope again afterwards. 1100 // that scope again afterwards.
1101 1101
1102 Label try_handler_setup, catch_entry, done; 1102 Label try_handler_setup, catch_entry, done;
1103 __ Call(&try_handler_setup); 1103 __ Call(&try_handler_setup);
1104 // Try handler code, exception in result register. 1104 // Try handler code, exception in result register.
1105 1105
1106 // Extend the context before executing the catch block. 1106 // Extend the context before executing the catch block.
1107 { Comment cmnt(masm_, "[ Extend catch context"); 1107 { Comment cmnt(masm_, "[ Extend catch context");
1108 __ Push(stmt->name()); 1108 __ Push(stmt->name());
1109 __ push(result_register()); 1109 __ push(result_register());
1110 __ CallRuntime(Runtime::kCreateCatchExtensionObject, 2); 1110 __ CallRuntime(Runtime::kPushCatchContext, 2);
1111 __ push(result_register());
1112 __ CallRuntime(Runtime::kPushCatchContext, 1);
1113 StoreToFrameField(StandardFrameConstants::kContextOffset, 1111 StoreToFrameField(StandardFrameConstants::kContextOffset,
1114 context_register()); 1112 context_register());
1115 } 1113 }
1116 1114
1117 Visit(stmt->catch_block()); 1115 Visit(stmt->catch_block());
1118 __ jmp(&done); 1116 __ jmp(&done);
1119 1117
1120 // Try block code. Sets up the exception handler chain. 1118 // Try block code. Sets up the exception handler chain.
1121 __ bind(&try_handler_setup); 1119 __ bind(&try_handler_setup);
1122 { 1120 {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 __ Drop(stack_depth); 1287 __ Drop(stack_depth);
1290 __ PopTryHandler(); 1288 __ PopTryHandler();
1291 return 0; 1289 return 0;
1292 } 1290 }
1293 1291
1294 1292
1295 #undef __ 1293 #undef __
1296 1294
1297 1295
1298 } } // namespace v8::internal 1296 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698