| Index: src/ast/scopes.h
|
| diff --git a/src/ast/scopes.h b/src/ast/scopes.h
|
| index 6987b7ffb153e066ae6ccc11f3a88eb56d6ef395..2df27c04188572b92f52c23567fd2e2aac68c31d 100644
|
| --- a/src/ast/scopes.h
|
| +++ b/src/ast/scopes.h
|
| @@ -411,6 +411,10 @@ class Scope: public ZoneObject {
|
| void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; }
|
| bool is_debug_evaluate_scope() const { return is_debug_evaluate_scope_; }
|
|
|
| + void set_is_lazily_parsed(bool is_lazily_parsed) {
|
| + is_lazily_parsed_ = is_lazily_parsed;
|
| + }
|
| +
|
| protected:
|
| explicit Scope(Zone* zone);
|
|
|
| @@ -437,6 +441,9 @@ class Scope: public ZoneObject {
|
| // should also be invoked after resolution.
|
| bool NeedsScopeInfo() const {
|
| DCHECK(!already_resolved_);
|
| + // A lazily parsed scope doesn't contain enough information to create a
|
| + // ScopeInfo from it.
|
| + if (is_lazily_parsed_) return false;
|
| return NeedsContext() || is_script_scope() || is_function_scope() ||
|
| is_eval_scope() || is_module_scope();
|
| }
|
| @@ -506,6 +513,8 @@ class Scope: public ZoneObject {
|
| // True if it holds 'var' declarations.
|
| bool is_declaration_scope_ : 1;
|
|
|
| + bool is_lazily_parsed_ : 1;
|
| +
|
| // Create a non-local variable with a given name.
|
| // These variables are looked up dynamically at runtime.
|
| Variable* NonLocal(const AstRawString* name, VariableMode mode);
|
|
|