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

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

Issue 1022053002: MIPS: Fix 'MIPS: [es6] implement Reflect.apply() & Reflect.construct()' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index de62d59fe798d16a220e394cb3674da5e9fde1af..9bdc1e1bd8294430e63c2be7b32c3b2dfc357420 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -1432,6 +1432,7 @@ static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) {
__ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION);
}
+ // Returns the result in v0.
Generate_CheckStackOverflow(masm, kFunctionOffset);
// Push current limit and index.
@@ -1536,7 +1537,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
const int kStackSize = kFormalParameters + 1;
{
- FrameAndConstantPoolScope frame_scope(masm, StackFrame::INTERNAL);
+ FrameScope frame_scope(masm, StackFrame::INTERNAL);
const int kNewTargetOffset = kFPOnStackSize + kPCOnStackSize;
const int kArgumentsOffset = kNewTargetOffset + kPointerSize;
const int kFunctionOffset = kArgumentsOffset + kPointerSize;
@@ -1557,8 +1558,10 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
__ push(a0);
__ lw(a0, MemOperand(fp, kNewTargetOffset)); // get the new.target
__ push(a0);
+ // Returns argument count in v0.
__ InvokeBuiltin(Builtins::REFLECT_CONSTRUCT_PREPARE, CALL_FUNCTION);
+ // Returns result in v0.
Generate_CheckStackOverflow(masm, kFunctionOffset);
// Push current limit and index.
@@ -1591,8 +1594,8 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
// Leave internal frame.
}
- __ Addu(sp, sp, Operand(kStackSize * kPointerSize));
- __ Jump(ra);
+ __ jr(ra);
+ __ Addu(sp, sp, Operand(kStackSize * kPointerSize)); // In delay slot.
}
« no previous file with comments | « no previous file | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698