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

Unified Diff: src/ast/scopes.h

Issue 2199283002: [modules] Introduce new VariableLocation for module imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 3b12835e9fdc4efbc0b9c4922c704c0dc4b0c558..bebf65c05e698da7e0245e5e9f1bdc1673df9bb4 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -693,7 +693,11 @@ class DeclarationScope : public Scope {
// The ModuleDescriptor for this scope; only for module scopes.
// TODO(verwaest): Move to ModuleScope?
- ModuleDescriptor* module() const { return module_descriptor_; }
+ ModuleDescriptor* module() const {
+ DCHECK(is_module_scope());
+ DCHECK_NOT_NULL(module_descriptor_);
+ return module_descriptor_;
+ }
void DeclareThis(AstValueFactory* ast_value_factory);
void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory);
@@ -864,6 +868,9 @@ class DeclarationScope : public Scope {
void AllocateLocals(AstValueFactory* ast_value_factory);
void AllocateParameterLocals();
void AllocateReceiver();
+ // Set MODULE as VariableLocation for all variables that will live in some
+ // module's export table.
+ void AllocateModuleVariables();
private:
void AllocateParameter(Variable* var, int index);
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698