| 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 #ifndef V8_PARSING_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
| 7 | 7 |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/base/hashmap.h" | 10 #include "src/base/hashmap.h" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 ~ParsingModeScope() { | 600 ~ParsingModeScope() { |
| 601 parser_->mode_ = old_mode_; | 601 parser_->mode_ = old_mode_; |
| 602 } | 602 } |
| 603 | 603 |
| 604 private: | 604 private: |
| 605 ParserBase* parser_; | 605 ParserBase* parser_; |
| 606 Mode old_mode_; | 606 Mode old_mode_; |
| 607 }; | 607 }; |
| 608 | 608 |
| 609 DeclarationScope* NewScriptScope() { | 609 DeclarationScope* NewScriptScope() { |
| 610 return new (zone()) DeclarationScope(zone(), nullptr, SCRIPT_SCOPE); | 610 return new (zone()) DeclarationScope(zone()); |
| 611 } | 611 } |
| 612 | 612 |
| 613 DeclarationScope* NewVarblockScope() { | 613 DeclarationScope* NewVarblockScope() { |
| 614 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE); | 614 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE); |
| 615 } | 615 } |
| 616 | 616 |
| 617 ModuleScope* NewModuleScope(DeclarationScope* parent) { | 617 ModuleScope* NewModuleScope(DeclarationScope* parent) { |
| 618 return new (zone()) ModuleScope(zone(), parent, ast_value_factory()); | 618 return new (zone()) ModuleScope(zone(), parent, ast_value_factory()); |
| 619 } | 619 } |
| 620 | 620 |
| (...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3754 has_seen_constructor_ = true; | 3754 has_seen_constructor_ = true; |
| 3755 return; | 3755 return; |
| 3756 } | 3756 } |
| 3757 } | 3757 } |
| 3758 | 3758 |
| 3759 | 3759 |
| 3760 } // namespace internal | 3760 } // namespace internal |
| 3761 } // namespace v8 | 3761 } // namespace v8 |
| 3762 | 3762 |
| 3763 #endif // V8_PARSING_PARSER_BASE_H | 3763 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |