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_AST_SCOPES_H_ | 5 #ifndef V8_AST_SCOPES_H_ |
6 #define V8_AST_SCOPES_H_ | 6 #define V8_AST_SCOPES_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/base/hashmap.h" | 9 #include "src/base/hashmap.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // Convenience variable; function scopes only. | 832 // Convenience variable; function scopes only. |
833 Variable* arguments_; | 833 Variable* arguments_; |
834 // Convenience variable; Subclass constructor only | 834 // Convenience variable; Subclass constructor only |
835 Variable* this_function_; | 835 Variable* this_function_; |
836 }; | 836 }; |
837 | 837 |
838 class ModuleScope final : public DeclarationScope { | 838 class ModuleScope final : public DeclarationScope { |
839 public: | 839 public: |
840 ModuleScope(DeclarationScope* script_scope, | 840 ModuleScope(DeclarationScope* script_scope, |
841 AstValueFactory* ast_value_factory); | 841 AstValueFactory* ast_value_factory); |
| 842 ModuleScope(Isolate* isolate, Handle<ScopeInfo> scope_info, |
| 843 AstValueFactory* ast_value_factory); |
842 | 844 |
843 ModuleDescriptor* module() const { | 845 ModuleDescriptor* module() const { |
844 DCHECK_NOT_NULL(module_descriptor_); | 846 DCHECK_NOT_NULL(module_descriptor_); |
845 return module_descriptor_; | 847 return module_descriptor_; |
846 } | 848 } |
847 | 849 |
848 // Set MODULE as VariableLocation for all variables that will live in some | 850 // Set MODULE as VariableLocation for all variables that will live in some |
849 // module's export table. | 851 // module's export table. |
850 void AllocateModuleVariables(); | 852 void AllocateModuleVariables(); |
851 | 853 |
852 private: | 854 private: |
853 ModuleDescriptor* module_descriptor_; | 855 ModuleDescriptor* module_descriptor_; |
854 }; | 856 }; |
855 | 857 |
856 } // namespace internal | 858 } // namespace internal |
857 } // namespace v8 | 859 } // namespace v8 |
858 | 860 |
859 #endif // V8_AST_SCOPES_H_ | 861 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |