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-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 Label try_entry, handler_entry, exit; | 1326 Label try_entry, handler_entry, exit; |
1327 __ jmp(&try_entry); | 1327 __ jmp(&try_entry); |
1328 __ bind(&handler_entry); | 1328 __ bind(&handler_entry); |
1329 if (stmt->clear_pending_message()) ClearPendingMessage(); | 1329 if (stmt->clear_pending_message()) ClearPendingMessage(); |
1330 | 1330 |
1331 // Exception handler code, the exception is in the result register. | 1331 // Exception handler code, the exception is in the result register. |
1332 // Extend the context before executing the catch block. | 1332 // Extend the context before executing the catch block. |
1333 { Comment cmnt(masm_, "[ Extend catch context"); | 1333 { Comment cmnt(masm_, "[ Extend catch context"); |
1334 PushOperand(stmt->variable()->name()); | 1334 PushOperand(stmt->variable()->name()); |
1335 PushOperand(result_register()); | 1335 PushOperand(result_register()); |
| 1336 PushOperand(stmt->scope()->scope_info()); |
1336 PushFunctionArgumentForContextAllocation(); | 1337 PushFunctionArgumentForContextAllocation(); |
1337 CallRuntimeWithOperands(Runtime::kPushCatchContext); | 1338 CallRuntimeWithOperands(Runtime::kPushCatchContext); |
1338 StoreToFrameField(StandardFrameConstants::kContextOffset, | 1339 StoreToFrameField(StandardFrameConstants::kContextOffset, |
1339 context_register()); | 1340 context_register()); |
1340 } | 1341 } |
1341 | 1342 |
1342 Scope* saved_scope = scope(); | 1343 Scope* saved_scope = scope(); |
1343 scope_ = stmt->scope(); | 1344 scope_ = stmt->scope(); |
1344 DCHECK(scope_->declarations()->is_empty()); | 1345 DCHECK(scope_->declarations()->is_empty()); |
1345 { WithOrCatch catch_body(this); | 1346 { WithOrCatch catch_body(this); |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2008 return info_->has_simple_parameters(); | 2009 return info_->has_simple_parameters(); |
2009 } | 2010 } |
2010 | 2011 |
2011 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 2012 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
2012 | 2013 |
2013 #undef __ | 2014 #undef __ |
2014 | 2015 |
2015 | 2016 |
2016 } // namespace internal | 2017 } // namespace internal |
2017 } // namespace v8 | 2018 } // namespace v8 |
OLD | NEW |