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); |