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:
parent
6812883494
commit
40f43c91a5
@ -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.
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user