OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 | 1276 |
1277 // The try block adds a handler to the exception handler chain before | 1277 // The try block adds a handler to the exception handler chain before |
1278 // entering, and removes it again when exiting normally. If an exception | 1278 // entering, and removes it again when exiting normally. If an exception |
1279 // is thrown during execution of the try block, the handler is consumed | 1279 // is thrown during execution of the try block, the handler is consumed |
1280 // and control is passed to the catch block with the exception in the | 1280 // and control is passed to the catch block with the exception in the |
1281 // result register. | 1281 // result register. |
1282 | 1282 |
1283 Label try_entry, handler_entry, exit; | 1283 Label try_entry, handler_entry, exit; |
1284 __ jmp(&try_entry); | 1284 __ jmp(&try_entry); |
1285 __ bind(&handler_entry); | 1285 __ bind(&handler_entry); |
1286 ClearPendingMessage(); | 1286 if (stmt->clear_pending_message()) ClearPendingMessage(); |
1287 | 1287 |
1288 // Exception handler code, the exception is in the result register. | 1288 // Exception handler code, the exception is in the result register. |
1289 // Extend the context before executing the catch block. | 1289 // Extend the context before executing the catch block. |
1290 { Comment cmnt(masm_, "[ Extend catch context"); | 1290 { Comment cmnt(masm_, "[ Extend catch context"); |
1291 PushOperand(stmt->variable()->name()); | 1291 PushOperand(stmt->variable()->name()); |
1292 PushOperand(result_register()); | 1292 PushOperand(result_register()); |
1293 PushFunctionArgumentForContextAllocation(); | 1293 PushFunctionArgumentForContextAllocation(); |
1294 CallRuntimeWithOperands(Runtime::kPushCatchContext); | 1294 CallRuntimeWithOperands(Runtime::kPushCatchContext); |
1295 StoreToFrameField(StandardFrameConstants::kContextOffset, | 1295 StoreToFrameField(StandardFrameConstants::kContextOffset, |
1296 context_register()); | 1296 context_register()); |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1938 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1939 var->initializer_position() >= proxy->position(); | 1939 var->initializer_position() >= proxy->position(); |
1940 } | 1940 } |
1941 | 1941 |
1942 | 1942 |
1943 #undef __ | 1943 #undef __ |
1944 | 1944 |
1945 | 1945 |
1946 } // namespace internal | 1946 } // namespace internal |
1947 } // namespace v8 | 1947 } // namespace v8 |
OLD | NEW |