Index: src/builtins/arm64/builtins-arm64.cc |
diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc |
index 7327be2fc4473412823b2e78cf1b12030e73fd0c..aeb0508a20e7342ed897f4a454a5c69bdf68dd7b 100644 |
--- a/src/builtins/arm64/builtins-arm64.cc |
+++ b/src/builtins/arm64/builtins-arm64.cc |
@@ -1306,7 +1306,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( |
@@ -1347,6 +1347,29 @@ void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { |
__ Jump(ip0); |
} |
+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. |
+ __ Ldr(x1, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); |
+ __ Ldr(x2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); |
+ __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(kInterpreterAccumulatorRegister, x1, x2); |
+ __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); |
+ __ Mov(x2, x0); // Result is the new bytecode offset. |
+ __ Pop(kInterpreterAccumulatorRegister); |
+ } |
+ __ Str(x2, 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 ------------- |
// -- x0 : argument count (preserved for callee) |