| Index: src/scopes.h
|
| diff --git a/src/scopes.h b/src/scopes.h
|
| index 2868cdeecb37dd776f8386c813afe19338dc6b14..4f11ea5e519990c995b1c6f2e1329bf8e9eff88e 100644
|
| --- a/src/scopes.h
|
| +++ b/src/scopes.h
|
| @@ -280,7 +280,8 @@ class Scope: public ZoneObject {
|
| bool is_block_scope() const { return type_ == BLOCK_SCOPE; }
|
| bool is_with_scope() const { return type_ == WITH_SCOPE; }
|
| bool is_declaration_scope() const {
|
| - return is_eval_scope() || is_function_scope() || is_global_scope();
|
| + return is_eval_scope() || is_function_scope() ||
|
| + is_module_scope() || is_global_scope();
|
| }
|
| bool is_classic_mode() const {
|
| return language_mode() == CLASSIC_MODE;
|
| @@ -592,6 +593,13 @@ class Scope: public ZoneObject {
|
| bool AllocateVariables(CompilationInfo* info,
|
| AstNodeFactory<AstNullVisitor>* factory);
|
|
|
| + // Instance objects have to be created ahead of time (before code generation)
|
| + // because of potentially cyclic references between them.
|
| + // Linking also has to be a separate stage, since populating one object may
|
| + // potentially require (forward) references to others.
|
| + void AllocateModules(CompilationInfo* info);
|
| + void LinkModules(CompilationInfo* info);
|
| +
|
| private:
|
| // Construct a scope based on the scope info.
|
| Scope(Scope* inner_scope, ScopeType type, Handle<ScopeInfo> scope_info,
|
|
|