| Index: src/ast/scopes.cc
|
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
|
| index 0032d4aaba9316fb82f9bc8a7720d4c602e416a7..02d8391ea895d110b99e59fec602fd6ce6594a7e 100644
|
| --- a/src/ast/scopes.cc
|
| +++ b/src/ast/scopes.cc
|
| @@ -171,7 +171,6 @@ void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope,
|
| this_function_ = nullptr;
|
| illegal_redecl_ = nullptr;
|
| scope_inside_with_ = false;
|
| - scope_contains_with_ = false;
|
| scope_calls_eval_ = false;
|
| scope_uses_arguments_ = false;
|
| scope_uses_super_property_ = false;
|
| @@ -252,7 +251,6 @@ Scope* Scope::DeserializeScopeChain(Isolate* isolate, Zone* zone,
|
| script_scope->ast_value_factory_->GetString(Handle<String>(name)),
|
| script_scope->ast_value_factory_);
|
| }
|
| - if (contains_with) current_scope->RecordWithStatement();
|
| if (innermost_scope == NULL) innermost_scope = current_scope;
|
|
|
| // Forget about a with when we move to a context for a different function.
|
| @@ -392,7 +390,6 @@ void Scope::PropagateUsageFlagsToScope(Scope* other) {
|
| if (uses_arguments()) other->RecordArgumentsUsage();
|
| if (uses_super_property()) other->RecordSuperPropertyUsage();
|
| if (calls_eval()) other->RecordEvalCall();
|
| - if (scope_contains_with_) other->RecordWithStatement();
|
| }
|
|
|
|
|
| @@ -982,7 +979,6 @@ void Scope::Print(int n) {
|
| Indent(n1, "// strict mode scope\n");
|
| }
|
| if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n");
|
| - if (scope_contains_with_) Indent(n1, "// scope contains 'with'\n");
|
| if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n");
|
| if (scope_uses_arguments_) Indent(n1, "// scope uses 'arguments'\n");
|
| if (scope_uses_super_property_)
|
| @@ -1254,8 +1250,8 @@ bool Scope::MustAllocate(Variable* var) {
|
| // visible name.
|
| if ((var->is_this() || !var->raw_name()->IsEmpty()) &&
|
| (var->has_forced_context_allocation() || scope_calls_eval_ ||
|
| - inner_scope_calls_eval_ || scope_contains_with_ || is_catch_scope() ||
|
| - is_block_scope() || is_module_scope() || is_script_scope())) {
|
| + inner_scope_calls_eval_ || is_catch_scope() || is_block_scope() ||
|
| + is_module_scope() || is_script_scope())) {
|
| var->set_is_used();
|
| if (scope_calls_eval_ || inner_scope_calls_eval_) var->set_maybe_assigned();
|
| }
|
| @@ -1278,10 +1274,8 @@ bool Scope::MustAllocateInContext(Variable* var) {
|
| if (var->mode() == TEMPORARY) return false;
|
| if (is_catch_scope() || is_module_scope()) return true;
|
| if (is_script_scope() && IsLexicalVariableMode(var->mode())) return true;
|
| - return var->has_forced_context_allocation() ||
|
| - scope_calls_eval_ ||
|
| - inner_scope_calls_eval_ ||
|
| - scope_contains_with_;
|
| + return var->has_forced_context_allocation() || scope_calls_eval_ ||
|
| + inner_scope_calls_eval_;
|
| }
|
|
|
|
|
|
|