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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 first_initializer_loc(Scanner::Location::invalid()), | 660 first_initializer_loc(Scanner::Location::invalid()), |
661 bindings_loc(Scanner::Location::invalid()) {} | 661 bindings_loc(Scanner::Location::invalid()) {} |
662 | 662 |
663 DeclarationDescriptor descriptor; | 663 DeclarationDescriptor descriptor; |
664 List<Declaration> declarations; | 664 List<Declaration> declarations; |
665 Scanner::Location first_initializer_loc; | 665 Scanner::Location first_initializer_loc; |
666 Scanner::Location bindings_loc; | 666 Scanner::Location bindings_loc; |
667 }; | 667 }; |
668 | 668 |
669 DeclarationScope* NewScriptScope() const { | 669 DeclarationScope* NewScriptScope() const { |
670 return new (zone()) DeclarationScope(zone()); | 670 return new (zone()) DeclarationScope(zone(), ast_value_factory()); |
671 } | 671 } |
672 | 672 |
673 DeclarationScope* NewVarblockScope() const { | 673 DeclarationScope* NewVarblockScope() const { |
674 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE); | 674 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE); |
675 } | 675 } |
676 | 676 |
677 ModuleScope* NewModuleScope(DeclarationScope* parent) const { | 677 ModuleScope* NewModuleScope(DeclarationScope* parent) const { |
678 return new (zone()) ModuleScope(parent, ast_value_factory()); | 678 return new (zone()) ModuleScope(parent, ast_value_factory()); |
679 } | 679 } |
680 | 680 |
(...skipping 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3688 has_seen_constructor_ = true; | 3688 has_seen_constructor_ = true; |
3689 return; | 3689 return; |
3690 } | 3690 } |
3691 } | 3691 } |
3692 | 3692 |
3693 | 3693 |
3694 } // namespace internal | 3694 } // namespace internal |
3695 } // namespace v8 | 3695 } // namespace v8 |
3696 | 3696 |
3697 #endif // V8_PARSING_PARSER_BASE_H | 3697 #endif // V8_PARSING_PARSER_BASE_H |
OLD | NEW |