Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: src/ast/scopes.h

Issue 2277253003: [modules] Partial scope info support of modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@modules-refactor
Patch Set: Avoid reusing module_vars_count Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // Convenience variable; function scopes only. 824 // Convenience variable; function scopes only.
825 Variable* arguments_; 825 Variable* arguments_;
826 // Convenience variable; Subclass constructor only 826 // Convenience variable; Subclass constructor only
827 Variable* this_function_; 827 Variable* this_function_;
828 }; 828 };
829 829
830 class ModuleScope final : public DeclarationScope { 830 class ModuleScope final : public DeclarationScope {
831 public: 831 public:
832 ModuleScope(DeclarationScope* script_scope, 832 ModuleScope(DeclarationScope* script_scope,
833 AstValueFactory* ast_value_factory); 833 AstValueFactory* ast_value_factory);
834 ModuleScope(Isolate* isolate, Handle<ScopeInfo> scope_info,
835 AstValueFactory* ast_value_factory);
834 836
835 ModuleDescriptor* module() const { 837 ModuleDescriptor* module() const {
836 DCHECK_NOT_NULL(module_descriptor_); 838 DCHECK_NOT_NULL(module_descriptor_);
837 return module_descriptor_; 839 return module_descriptor_;
838 } 840 }
839 841
840 // Set MODULE as VariableLocation for all variables that will live in some 842 // Set MODULE as VariableLocation for all variables that will live in some
841 // module's export table. 843 // module's export table.
842 void AllocateModuleVariables(); 844 void AllocateModuleVariables();
843 845
844 private: 846 private:
845 ModuleDescriptor* module_descriptor_; 847 ModuleDescriptor* module_descriptor_;
846 }; 848 };
847 849
848 } // namespace internal 850 } // namespace internal
849 } // namespace v8 851 } // namespace v8
850 852
851 #endif // V8_AST_SCOPES_H_ 853 #endif // V8_AST_SCOPES_H_
OLDNEW
« src/ast/scopeinfo.cc ('K') | « src/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698