Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: src/parser.cc

Issue 1154103005: Refactor lexical home object binding (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 383f96c8faf98609a165086a58954ddc04e454b8..a961f9140386b67cf84dbfb26b62341d37685dab 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -759,12 +759,16 @@ Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory,
Expression* ParserTraits::SuperPropertyReference(Scope* scope,
AstNodeFactory* factory,
int pos) {
- VariableProxy* home_object_proxy = scope->NewUnresolved(
- factory, parser_->ast_value_factory()->home_object_string(),
+ // this_function[home_object_symbol]
+ VariableProxy* this_function_proxy = scope->NewUnresolved(
+ factory, parser_->ast_value_factory()->this_function_string(),
Variable::NORMAL, pos);
+ Expression* home_object_symbol_literal =
+ factory->NewSymbolLiteral("home_object_symbol", RelocInfo::kNoPosition);
+ Expression* home_object = factory->NewProperty(
+ this_function_proxy, home_object_symbol_literal, pos);
return factory->NewSuperPropertyReference(
- ThisExpression(scope, factory, pos)->AsVariableProxy(), home_object_proxy,
- pos);
+ ThisExpression(scope, factory, pos)->AsVariableProxy(), home_object, pos);
}
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698