| Index: src/ast/scopes.h
|
| diff --git a/src/ast/scopes.h b/src/ast/scopes.h
|
| index fa289733066386d5635780a9359cdbd13a714302..ddcfb63d80688d34845d1c1c62b593dcafc5e63d 100644
|
| --- a/src/ast/scopes.h
|
| +++ b/src/ast/scopes.h
|
| @@ -423,6 +423,21 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {
|
| void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; }
|
| bool is_debug_evaluate_scope() const { return is_debug_evaluate_scope_; }
|
|
|
| + void RemoveInnerScope(Scope* inner_scope) {
|
| + DCHECK_NOT_NULL(inner_scope);
|
| + if (inner_scope == inner_scope_) {
|
| + inner_scope_ = inner_scope_->sibling_;
|
| + return;
|
| + }
|
| + for (Scope* scope = inner_scope_; scope != nullptr;
|
| + scope = scope->sibling_) {
|
| + if (scope->sibling_ == inner_scope) {
|
| + scope->sibling_ = scope->sibling_->sibling_;
|
| + return;
|
| + }
|
| + }
|
| + }
|
| +
|
| protected:
|
| explicit Scope(Zone* zone);
|
|
|
| @@ -560,21 +575,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {
|
| inner_scope->outer_scope_ = this;
|
| }
|
|
|
| - void RemoveInnerScope(Scope* inner_scope) {
|
| - DCHECK_NOT_NULL(inner_scope);
|
| - if (inner_scope == inner_scope_) {
|
| - inner_scope_ = inner_scope_->sibling_;
|
| - return;
|
| - }
|
| - for (Scope* scope = inner_scope_; scope != nullptr;
|
| - scope = scope->sibling_) {
|
| - if (scope->sibling_ == inner_scope) {
|
| - scope->sibling_ = scope->sibling_->sibling_;
|
| - return;
|
| - }
|
| - }
|
| - }
|
| -
|
| void SetDefaults();
|
|
|
| friend class DeclarationScope;
|
|
|