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}
This commit is contained in:
adamk 2015-10-28 23:39:32 -07:00 committed by Commit bot
parent 6812883494
commit 40f43c91a5
2 changed files with 2 additions and 3 deletions

View File

@ -386,8 +386,6 @@ class Scope: public ZoneObject {
return receiver_;
}
Variable* LookupThis() { return Lookup(ast_value_factory_->this_string()); }
// TODO(wingo): Add a GLOBAL_SCOPE scope type which will lexically allocate
// "this" (and no other variable) on the native context. Script scopes then
// will not have a "this" declaration.

View File

@ -1091,7 +1091,8 @@ TEST(ScopeUsesArgumentsSuperThis) {
if ((source_data[i].expected & THIS) != 0) {
// Currently the is_used() flag is conservative; all variables in a
// 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());
}