Commit 40f43c91 authored by adamk's avatar adamk Committed by Commit bot

Inline single test-only call of Scope::LookupThis method

R=littledan@chromium.org

Review URL: https://codereview.chromium.org/1430643003

Cr-Commit-Position: refs/heads/master@{#31644}
parent 68128834
...@@ -386,8 +386,6 @@ class Scope: public ZoneObject { ...@@ -386,8 +386,6 @@ class Scope: public ZoneObject {
return receiver_; return receiver_;
} }
Variable* LookupThis() { return Lookup(ast_value_factory_->this_string()); }
// TODO(wingo): Add a GLOBAL_SCOPE scope type which will lexically allocate // TODO(wingo): Add a GLOBAL_SCOPE scope type which will lexically allocate
// "this" (and no other variable) on the native context. Script scopes then // "this" (and no other variable) on the native context. Script scopes then
// will not have a "this" declaration. // will not have a "this" declaration.
......
...@@ -1091,7 +1091,8 @@ TEST(ScopeUsesArgumentsSuperThis) { ...@@ -1091,7 +1091,8 @@ TEST(ScopeUsesArgumentsSuperThis) {
if ((source_data[i].expected & THIS) != 0) { if ((source_data[i].expected & THIS) != 0) {
// Currently the is_used() flag is conservative; all variables in a // Currently the is_used() flag is conservative; all variables in a
// script scope are marked as used. // script scope are marked as used.
CHECK(scope->LookupThis()->is_used()); CHECK(
scope->Lookup(info.ast_value_factory()->this_string())->is_used());
} }
CHECK_EQ((source_data[i].expected & EVAL) != 0, scope->calls_eval()); CHECK_EQ((source_data[i].expected & EVAL) != 0, scope->calls_eval());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment