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

Unified Diff: src/x87/builtins-x87.cc

Issue 1477663002: X87: [turbofan] Switch passing of new.target to register. (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/x87/lithium-codegen-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
index 68dabc7123d53c4977cb23d0705a8832237705bd..8c2433b16afdc2f2cb875d6799c019f3a331d34c 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/x87/builtins-x87.cc
@@ -75,14 +75,21 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
static void CallRuntimePassFunction(
MacroAssembler* masm, Runtime::FunctionId function_id) {
+ // ----------- S t a t e -------------
+ // -- edx : new target (preserved for callee)
+ // -- edi : target function (preserved for callee)
+ // -----------------------------------
+
FrameScope scope(masm, StackFrame::INTERNAL);
- // Push a copy of the function.
+ // Push a copy of the target function and the new target.
__ push(edi);
+ __ push(edx);
// Function is also the parameter to the runtime call.
__ push(edi);
__ CallRuntime(function_id, 1);
- // Restore receiver.
+ // Restore target function and new target.
+ __ pop(edx);
__ pop(edi);
}
@@ -332,8 +339,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ call(code, RelocInfo::CODE_TARGET);
} else {
ParameterCount actual(eax);
- __ InvokeFunction(edi, actual, CALL_FUNCTION,
- NullCallWrapper());
+ __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, NullCallWrapper());
}
// Store offset of return address for deoptimizer.
@@ -1528,8 +1534,8 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
__ SmiUntag(ebx);
ParameterCount actual(eax);
ParameterCount expected(ebx);
- __ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), expected,
- actual, JUMP_FUNCTION, NullCallWrapper());
+ __ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), no_reg,
+ expected, actual, JUMP_FUNCTION, NullCallWrapper());
// The function is a "classConstructor", need to raise an exception.
__ bind(&class_constructor);
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698