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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 643 |
644 DeclarationScope* NewScriptScope() const { | 644 DeclarationScope* NewScriptScope() const { |
645 return new (zone()) DeclarationScope(zone()); | 645 return new (zone()) DeclarationScope(zone()); |
646 } | 646 } |
647 | 647 |
648 DeclarationScope* NewVarblockScope() const { | 648 DeclarationScope* NewVarblockScope() const { |
649 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE); | 649 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE); |
650 } | 650 } |
651 | 651 |
652 ModuleScope* NewModuleScope(DeclarationScope* parent) const { | 652 ModuleScope* NewModuleScope(DeclarationScope* parent) const { |
653 return new (zone()) ModuleScope(zone(), parent, ast_value_factory()); | 653 return new (zone()) ModuleScope(parent, ast_value_factory()); |
654 } | 654 } |
655 | 655 |
656 DeclarationScope* NewEvalScope(Scope* parent) const { | 656 DeclarationScope* NewEvalScope(Scope* parent) const { |
657 return new (zone()) DeclarationScope(zone(), parent, EVAL_SCOPE); | 657 return new (zone()) DeclarationScope(zone(), parent, EVAL_SCOPE); |
658 } | 658 } |
659 | 659 |
660 Scope* NewScope(ScopeType scope_type) const { | 660 Scope* NewScope(ScopeType scope_type) const { |
661 return NewScopeWithParent(scope(), scope_type); | 661 return NewScopeWithParent(scope(), scope_type); |
662 } | 662 } |
663 | 663 |
(...skipping 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3706 has_seen_constructor_ = true; | 3706 has_seen_constructor_ = true; |
3707 return; | 3707 return; |
3708 } | 3708 } |
3709 } | 3709 } |
3710 | 3710 |
3711 | 3711 |
3712 } // namespace internal | 3712 } // namespace internal |
3713 } // namespace v8 | 3713 } // namespace v8 |
3714 | 3714 |
3715 #endif // V8_PARSING_PARSER_BASE_H | 3715 #endif // V8_PARSING_PARSER_BASE_H |
OLD | NEW |