| 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/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
| (...skipping 6513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6524 Block* catch_block = factory->NewBlock(nullptr, 1, false, nopos); | 6524 Block* catch_block = factory->NewBlock(nullptr, 1, false, nopos); |
| 6525 catch_block->statements()->Add(set_mode_throw, zone); | 6525 catch_block->statements()->Add(set_mode_throw, zone); |
| 6526 | 6526 |
| 6527 Scope* catch_scope = NewScopeWithParent(scope, CATCH_SCOPE); | 6527 Scope* catch_scope = NewScopeWithParent(scope, CATCH_SCOPE); |
| 6528 catch_scope->set_is_hidden(); | 6528 catch_scope->set_is_hidden(); |
| 6529 const AstRawString* name = avfactory->dot_catch_string(); | 6529 const AstRawString* name = avfactory->dot_catch_string(); |
| 6530 Variable* catch_variable = | 6530 Variable* catch_variable = |
| 6531 catch_scope->DeclareLocal(name, VAR, kCreatedInitialized, | 6531 catch_scope->DeclareLocal(name, VAR, kCreatedInitialized, |
| 6532 Variable::NORMAL); | 6532 Variable::NORMAL); |
| 6533 | 6533 |
| 6534 try_catch = factory->NewTryCatchStatement( | 6534 try_catch = factory->NewTryCatchStatementForDesugaring( |
| 6535 try_block, catch_scope, catch_variable, catch_block, nopos); | 6535 try_block, catch_scope, catch_variable, catch_block, nopos); |
| 6536 } | 6536 } |
| 6537 | 6537 |
| 6538 | 6538 |
| 6539 // try { ... } finally { ... } | 6539 // try { ... } finally { ... } |
| 6540 Statement* try_finally; | 6540 Statement* try_finally; |
| 6541 { | 6541 { |
| 6542 Block* try_block = factory->NewBlock(nullptr, 1, false, nopos); | 6542 Block* try_block = factory->NewBlock(nullptr, 1, false, nopos); |
| 6543 try_block->statements()->Add(try_catch, zone); | 6543 try_block->statements()->Add(try_catch, zone); |
| 6544 | 6544 |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7088 node->Print(Isolate::Current()); | 7088 node->Print(Isolate::Current()); |
| 7089 } | 7089 } |
| 7090 #endif // DEBUG | 7090 #endif // DEBUG |
| 7091 | 7091 |
| 7092 #undef CHECK_OK | 7092 #undef CHECK_OK |
| 7093 #undef CHECK_OK_VOID | 7093 #undef CHECK_OK_VOID |
| 7094 #undef CHECK_FAILED | 7094 #undef CHECK_FAILED |
| 7095 | 7095 |
| 7096 } // namespace internal | 7096 } // namespace internal |
| 7097 } // namespace v8 | 7097 } // namespace v8 |
| OLD | NEW |