| Index: src/ast/scopes.cc
|
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
|
| index bd91e16a5220cccfab9ccb59f7eee7464dedac52..10eb8a4d41ef00307827317ca187e0bef2359b12 100644
|
| --- a/src/ast/scopes.cc
|
| +++ b/src/ast/scopes.cc
|
| @@ -298,6 +298,8 @@ void DeclarationScope::SetDefaults() {
|
| function_ = nullptr;
|
| arguments_ = nullptr;
|
| this_function_ = nullptr;
|
| + generator_object_ = nullptr;
|
| + promise_ = nullptr;
|
| should_eager_compile_ = false;
|
| was_lazily_parsed_ = false;
|
| #ifdef DEBUG
|
| @@ -703,6 +705,21 @@ Variable* DeclarationScope::DeclareFunctionVar(const AstRawString* name) {
|
| return function_;
|
| }
|
|
|
| +Variable* DeclarationScope::DeclareGeneratorObjectVar(
|
| + const AstRawString* name) {
|
| + DCHECK(is_function_scope() || is_module_scope());
|
| + DCHECK_NULL(generator_object_);
|
| + generator_object_ = NewTemporary(name);
|
| + return generator_object_;
|
| +}
|
| +
|
| +Variable* DeclarationScope::DeclarePromiseVar(const AstRawString* name) {
|
| + DCHECK(is_function_scope());
|
| + DCHECK_NULL(promise_);
|
| + promise_ = NewTemporary(name);
|
| + return promise_;
|
| +}
|
| +
|
| bool Scope::HasBeenRemoved() const {
|
| if (sibling() == this) {
|
| DCHECK_NULL(inner_scope_);
|
|
|