Index: src/builtins/mips64/builtins-mips64.cc |
diff --git a/src/builtins/mips64/builtins-mips64.cc b/src/builtins/mips64/builtins-mips64.cc |
index dcd1d40dec628a16f2079e17f0814f88758bedd5..a6abb55c466b7e61dda4735f58a593d6dc0d69a8 100644 |
--- a/src/builtins/mips64/builtins-mips64.cc |
+++ b/src/builtins/mips64/builtins-mips64.cc |
@@ -1288,7 +1288,7 @@ void Builtins::Generate_InterpreterPushArgsAndConstructArray( |
} |
} |
-void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { |
+static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) { |
// Set the return address to the correct point in the interpreter entry |
// trampoline. |
Smi* interpreter_entry_return_pc_offset( |
@@ -1331,6 +1331,29 @@ void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { |
__ Jump(a1); |
} |
+void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) { |
+ // Advance the current bytecode offset stored within the given interpreter |
+ // stack frame. This simulates what all bytecode handlers do upon completion |
+ // of the underlying operation. |
+ __ ld(a1, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); |
+ __ ld(a2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); |
+ __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(kInterpreterAccumulatorRegister, a1, a2); |
+ __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); |
+ __ mov(a2, v0); // Result is the new bytecode offset. |
+ __ Pop(kInterpreterAccumulatorRegister); |
+ } |
+ __ sd(a2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); |
+ |
+ Generate_InterpreterEnterBytecode(masm); |
+} |
+ |
+void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { |
+ Generate_InterpreterEnterBytecode(masm); |
+} |
+ |
void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- a0 : argument count (preserved for callee) |