Chromium Code Reviews| Index: src/ast/scopes.cc |
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
| index fbc29609fd06ef80a112e561e69f78ae42789286..db16c324ebdc2b120222abaf1494297f54e62fdf 100644 |
| --- a/src/ast/scopes.cc |
| +++ b/src/ast/scopes.cc |
| @@ -217,7 +217,6 @@ void Scope::SetDefaults() { |
| inner_scope_ = nullptr; |
| sibling_ = nullptr; |
| unresolved_ = nullptr; |
| - dynamics_ = nullptr; |
| start_position_ = kNoSourcePosition; |
| end_position_ = kNoSourcePosition; |
| @@ -1176,13 +1175,6 @@ void Scope::Print(int n) { |
| PrintMap(n1, &variables_); |
| } |
| - if (dynamics_ != NULL) { |
| - Indent(n1, "// dynamic vars:\n"); |
|
adamk
2016/08/23 22:12:19
So this means non-locals will now be printed as pa
|
| - PrintMap(n1, dynamics_->GetMap(DYNAMIC)); |
| - PrintMap(n1, dynamics_->GetMap(DYNAMIC_LOCAL)); |
| - PrintMap(n1, dynamics_->GetMap(DYNAMIC_GLOBAL)); |
| - } |
| - |
| // Print inner scopes (disable by providing negative n). |
| if (n >= 0) { |
| for (Scope* scope = inner_scope_; scope != nullptr; |
| @@ -1215,17 +1207,12 @@ void Scope::CheckZones() { |
| #endif // DEBUG |
| Variable* Scope::NonLocal(const AstRawString* name, VariableMode mode) { |
| - if (dynamics_ == NULL) dynamics_ = new (zone()) DynamicScopePart(zone()); |
| - VariableMap* map = dynamics_->GetMap(mode); |
| - Variable* var = map->Lookup(name); |
| - if (var == NULL) { |
| - // Declare a new non-local. |
| - DCHECK(!IsLexicalVariableMode(mode)); |
| - var = map->Declare(zone(), NULL, name, mode, Variable::NORMAL, |
| - kCreatedInitialized); |
| - // Allocate it by giving it a dynamic lookup. |
| - var->AllocateTo(VariableLocation::LOOKUP, -1); |
| - } |
| + // Declare a new non-local. |
| + DCHECK(IsDynamicVariableMode(mode)); |
| + Variable* var = variables_.Declare(zone(), NULL, name, mode, Variable::NORMAL, |
| + kCreatedInitialized); |
| + // Allocate it by giving it a dynamic lookup. |
| + var->AllocateTo(VariableLocation::LOOKUP, -1); |
| return var; |
| } |