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

Unified Diff: src/mips64/code-stubs-mips64.cc

Issue 1237813002: Switch CallConstructStub to take new.target in register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments about ARM and MIPS. 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/builtins-mips64.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
index 90a72ada64bb785e5f433e0ce9a82d608ceef496..68737b00c507fe8a5ce421ee530f00461dbb42fe 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -2780,16 +2780,23 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
// a0 : number of arguments
// a1 : the function to call
// a2 : feedback vector
- // a3 : (only if a2 is not undefined) slot in feedback vector (Smi)
+ // a3 : slot in feedback vector (Smi, for RecordCallTarget)
+ // a4 : original constructor (for IsSuperConstructorCall)
Label slow, non_function_call;
// Check that the function is not a smi.
__ JumpIfSmi(a1, &non_function_call);
// Check that the function is a JSFunction.
- __ GetObjectType(a1, a4, a4);
- __ Branch(&slow, ne, a4, Operand(JS_FUNCTION_TYPE));
+ __ GetObjectType(a1, a5, a5);
+ __ Branch(&slow, ne, a5, Operand(JS_FUNCTION_TYPE));
if (RecordCallTarget()) {
+ if (IsSuperConstructorCall()) {
+ __ push(a4);
+ }
GenerateRecordCallTarget(masm);
+ if (IsSuperConstructorCall()) {
+ __ pop(a4);
+ }
__ dsrl(at, a3, 32 - kPointerSizeLog2);
__ Daddu(a5, a2, at);
@@ -2814,11 +2821,7 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
// Pass function as original constructor.
if (IsSuperConstructorCall()) {
- __ li(a4, Operand(1 * kPointerSize));
- __ dsll(at, a0, kPointerSizeLog2);
- __ daddu(a4, a4, at);
- __ daddu(at, sp, a4);
- __ ld(a3, MemOperand(at, 0));
+ __ mov(a3, a4);
} else {
__ mov(a3, a1);
}
@@ -2833,10 +2836,10 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
// a0: number of arguments
// a1: called object
- // a4: object type
+ // a5: object type
Label do_call;
__ bind(&slow);
- __ Branch(&non_function_call, ne, a4, Operand(JS_FUNCTION_PROXY_TYPE));
+ __ Branch(&non_function_call, ne, a5, Operand(JS_FUNCTION_PROXY_TYPE));
__ GetBuiltinFunction(a1, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
__ jmp(&do_call);
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698