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

Unified Diff: src/crankshaft/ia32/lithium-codegen-ia32.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/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
index 7b05078a9bdba4629fb62392e1d24ebe1bfcb974..eb06ad792eb4057364677c102623b61b967bf3ad 100644
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
@@ -3291,7 +3291,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
// Change context.
__ mov(esi, FieldOperand(function_reg, JSFunction::kContextOffset));
- // Always initialize eax to the number of actual arguments.
+ // Always initialize new target and number of actual arguments.
+ __ mov(edx, factory()->undefined_value());
__ mov(eax, arity);
// Invoke function directly.
@@ -3354,11 +3355,13 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
DCHECK(ToRegister(instr->function()).is(edi));
DCHECK(ToRegister(instr->result()).is(eax));
- __ mov(eax, instr->arity());
-
// Change context.
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
+ // Always initialize new target and number of actual arguments.
+ __ mov(edx, factory()->undefined_value());
+ __ mov(eax, 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/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698