Reviewers: marja,
Description:
Rip out unused inner_scope_contains_with flag
[email protected]
BUG=
Please review this at https://codereview.chromium.org/349033006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -14 lines):
M src/scopes.h
M src/scopes.cc
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index
6806ee95cf4aeb8fc87c1306f1c0e7fcf51a9d1e..0dfc3a2c426f4a917823cbf13a677940509e1dd0
100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -170,7 +170,6 @@ void Scope::SetDefaults(ScopeType scope_type,
strict_mode_ = outer_scope != NULL ? outer_scope->strict_mode_ : SLOPPY;
outer_scope_calls_sloppy_eval_ = false;
inner_scope_calls_eval_ = false;
- inner_scope_contains_with_ = false;
force_eager_compilation_ = false;
force_context_allocation_ = (outer_scope != NULL && !is_function_scope())
? outer_scope->has_forced_context_allocation() : false;
@@ -195,7 +194,6 @@ Scope* Scope::DeserializeScopeChain(Context* context,
Scope* global_scope,
Scope* current_scope = NULL;
Scope* innermost_scope = NULL;
bool contains_with = false;
- bool inner_contains_with = false;
while (!context->IsNativeContext()) {
if (context->IsWithContext()) {
Scope* with_scope = new(zone) Scope(current_scope,
@@ -245,11 +243,7 @@ Scope* Scope::DeserializeScopeChain(Context* context,
Scope* global_scope,
global_scope->ast_value_factory_->GetString(Handle<String>(name)),
global_scope->ast_value_factory_, zone);
}
- if (inner_contains_with) current_scope->inner_scope_contains_with_ =
true;
- if (contains_with) {
- current_scope->RecordWithStatement();
- inner_contains_with = true;
- }
+ 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.
@@ -887,9 +881,6 @@ void Scope::Print(int n) {
}
if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n");
if (scope_contains_with_) Indent(n1, "// scope contains 'with'\n");
- if (inner_scope_contains_with_) {
- Indent(n1, "// inner scope contains 'with'\n");
- }
if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n");
if (outer_scope_calls_sloppy_eval_) {
Indent(n1, "// outer scope calls 'eval' in sloppy context\n");
@@ -1170,9 +1161,6 @@ void Scope::PropagateScopeInfo(bool
outer_scope_calls_sloppy_eval ) {
if (inner->scope_calls_eval_ || inner->inner_scope_calls_eval_) {
inner_scope_calls_eval_ = true;
}
- if (inner->scope_contains_with_ || inner->inner_scope_contains_with_) {
- inner_scope_contains_with_ = true;
- }
if (inner->force_eager_compilation_) {
force_eager_compilation_ = true;
}
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index
a382234748b4697895524abd1e752c1e7d40159f..f41a088da331eef5a7c9962693fd92b8806d4cc3
100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -474,7 +474,6 @@ class Scope: public ZoneObject {
// Computed via PropagateScopeInfo.
bool outer_scope_calls_sloppy_eval_;
bool inner_scope_calls_eval_;
- bool inner_scope_contains_with_;
bool force_eager_compilation_;
bool force_context_allocation_;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.