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

Unified Diff: src/parser.cc

Issue 1234383002: Remove obsolete %CallSuperWithSpread intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-super-4
Patch Set: Ported to all architectures. Created 5 years, 5 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 2b3f482a265c17e99d4202fa2bb798cc4972a0bd..d9b058f5c20adf1b596440fe07c4b2c69a7000d4 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -5931,16 +5931,16 @@ Expression* Parser::SpreadCall(Expression* function,
int pos) {
if (function->IsSuperCallReference()) {
// Super calls
- // %_CallSuperWithSpread(%ReflectConstruct(<super>, args, new.target))
- args->InsertAt(0, function, zone());
+ // %ReflectConstruct(%GetPrototype(<this-function>), args, new.target))
+ ZoneList<Expression*>* tmp = new (zone()) ZoneList<Expression*>(1, zone());
+ tmp->Add(function->AsSuperCallReference()->this_function_var(), zone());
+ Expression* get_prototype = factory()->NewCallRuntime(
+ ast_value_factory()->empty_string(),
+ Runtime::FunctionForId(Runtime::kGetPrototype), tmp, pos);
+ args->InsertAt(0, get_prototype, zone());
args->Add(function->AsSuperCallReference()->new_target_var(), zone());
- Expression* result = factory()->NewCallRuntime(
- ast_value_factory()->reflect_construct_string(), NULL, args, pos);
- args = new (zone()) ZoneList<Expression*>(1, zone());
- args->Add(result, zone());
return factory()->NewCallRuntime(
- ast_value_factory()->empty_string(),
- Runtime::FunctionForId(Runtime::kInlineCallSuperWithSpread), args, pos);
+ ast_value_factory()->reflect_construct_string(), NULL, args, pos);
} else {
if (function->IsProperty()) {
// Method calls
« 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