| Index: src/ast/scopes.h
|
| diff --git a/src/ast/scopes.h b/src/ast/scopes.h
|
| index 5f0ebb9ed50dab8a625d9368290a05cf199aca58..63fb5345d925ffe16c21032011bc63347fa96c12 100644
|
| --- a/src/ast/scopes.h
|
| +++ b/src/ast/scopes.h
|
| @@ -375,6 +375,9 @@ class Scope: public ZoneObject {
|
| // 'this' is bound, and what determines the function kind.
|
| DeclarationScope* GetReceiverScope();
|
|
|
| + // Find the module scope, assuming there is one.
|
| + ModuleScope* GetModuleScope();
|
| +
|
| // Analyze() must have been called once to create the ScopeInfo.
|
| Handle<ScopeInfo> scope_info() {
|
| DCHECK(!scope_info_.is_null());
|
| @@ -678,9 +681,9 @@ class DeclarationScope : public Scope {
|
| }
|
|
|
| // Parameters. The left-most parameter has index 0.
|
| - // Only valid for function scopes.
|
| + // Only valid for function and module scopes.
|
| Variable* parameter(int index) const {
|
| - DCHECK(is_function_scope());
|
| + DCHECK(is_function_scope() || is_module_scope());
|
| return params_[index];
|
| }
|
|
|
|
|