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

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

Issue 1203103003: Unify the stack layout for construct frames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix deopt case and clean up constants Created 5 years, 6 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/mips/frames-mips.h ('k') | src/mips64/frames-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index 7d7c12a2187b5cc5fe90d8c4379555fa45bbb963..c63d92d69d1d820e60454b4091e6647c757f2b7b 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -649,15 +649,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ bind(&count_incremented);
}
+ __ Pop(a1);
+
__ Push(t0, t0);
// Reload the number of arguments from the stack.
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
- __ ld(a1, MemOperand(sp, 2 * kPointerSize));
- __ ld(a3, MemOperand(sp, 3 * kPointerSize));
+ // sp[2]: number of arguments (smi-tagged)
+ __ ld(a3, MemOperand(sp, 2 * kPointerSize));
// Set up pointer to last argument.
__ Daddu(a2, fp, Operand(StandardFrameConstants::kCallerSPOffset));
@@ -672,8 +672,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// a3: number of arguments (smi-tagged)
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
+ // sp[2]: number of arguments (smi-tagged)
Label loop, entry;
__ SmiUntag(a3);
__ jmp(&entry);
@@ -715,8 +714,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// If the result is a smi, it is *not* an object in the ECMA sense.
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(v0, &use_receiver);
// If the type of the result (stored in its map) is less than
@@ -734,9 +732,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ bind(&exit);
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
- __ ld(a1, MemOperand(sp, 2 * kPointerSize));
+ // sp[1]: number of arguments (smi-tagged)
+ __ ld(a1, MemOperand(sp, kPointerSize));
// Leave construct frame.
}
« no previous file with comments | « src/mips/frames-mips.h ('k') | src/mips64/frames-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698