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

Unified Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1459183002: [crankshaft] Pass new.target to direct function calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ppc/lithium-codegen-ppc.cc
diff --git a/src/crankshaft/ppc/lithium-codegen-ppc.cc b/src/crankshaft/ppc/lithium-codegen-ppc.cc
index 8f8a0e50f5564c50c4aa311a29435e473cf02d11..847899eb052eaa1068c8df5dd71c764d39296b14 100644
--- a/src/crankshaft/ppc/lithium-codegen-ppc.cc
+++ b/src/crankshaft/ppc/lithium-codegen-ppc.cc
@@ -3589,7 +3589,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
// Change context.
__ LoadP(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset));
- // Always initialize r3 to the number of actual arguments.
+ // Always initialize new target and number of actual arguments.
+ __ LoadRoot(r6, Heap::kUndefinedValueRootIndex);
__ mov(r3, Operand(arity));
bool is_self_call = function.is_identical_to(info()->closure());
@@ -4003,11 +4004,13 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
DCHECK(ToRegister(instr->function()).is(r4));
DCHECK(ToRegister(instr->result()).is(r3));
- __ mov(r3, Operand(instr->arity()));
-
// Change context.
__ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
+ // Always initialize new target and number of actual arguments.
+ __ LoadRoot(r6, Heap::kUndefinedValueRootIndex);
+ __ mov(r3, Operand(instr->arity()));
+
bool is_self_call = false;
if (instr->hydrogen()->function()->IsConstant()) {
HConstant* fun_const = HConstant::cast(instr->hydrogen()->function());
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698