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

Unified Diff: src/crankshaft/arm/lithium-codegen-arm.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 | « no previous file | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm/lithium-codegen-arm.cc
diff --git a/src/crankshaft/arm/lithium-codegen-arm.cc b/src/crankshaft/arm/lithium-codegen-arm.cc
index c1b155af49fe53537a93d113064cfb9e3d5f0f3c..6d21fed571a7aac9f4ff42592f92fcfd00b0ec32 100644
--- a/src/crankshaft/arm/lithium-codegen-arm.cc
+++ b/src/crankshaft/arm/lithium-codegen-arm.cc
@@ -3415,7 +3415,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
// Change context.
__ ldr(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset));
- // Always initialize r0 to the number of actual arguments.
+ // Always initialize new target and number of actual arguments.
+ __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
__ mov(r0, Operand(arity));
// Invoke function.
@@ -3797,11 +3798,13 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
DCHECK(ToRegister(instr->function()).is(r1));
DCHECK(ToRegister(instr->result()).is(r0));
- __ mov(r0, Operand(instr->arity()));
-
// Change context.
__ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
+ // Always initialize new target and number of actual arguments.
+ __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
+ __ mov(r0, Operand(instr->arity()));
+
// Load the code entry address
__ ldr(ip, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
__ Call(ip);
« no previous file with comments | « no previous file | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698