Index: src/builtins/x64/builtins-x64.cc |
diff --git a/src/builtins/x64/builtins-x64.cc b/src/builtins/x64/builtins-x64.cc |
index f4367871b7e81e8b4aa0f49c67d8e4c8f9877ec0..96034165dcf808b9321f82a065eed170868d0dee 100644 |
--- a/src/builtins/x64/builtins-x64.cc |
+++ b/src/builtins/x64/builtins-x64.cc |
@@ -956,7 +956,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( |
@@ -998,6 +998,34 @@ void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { |
__ jmp(rbx); |
} |
+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. |
+ __ Pushad(); |
+ __ movp(arg_reg_1, |
+ Operand(rbp, InterpreterFrameConstants::kBytecodeArrayFromFp)); |
+ __ movp(arg_reg_2, |
+ Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); |
+ __ SmiToInteger32(arg_reg_2, arg_reg_2); |
+ { // NOLINT |
+ FrameScope scope(masm, StackFrame::MANUAL); |
+ __ PrepareCallCFunction(2); |
+ __ CallCFunction( |
+ ExternalReference::interpreter_advance_bytecode_offset(masm->isolate()), |
+ 2); |
+ } |
+ __ Integer32ToSmi(rax, rax); |
+ __ movp(Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp), rax); |
+ __ Popad(); |
+ |
+ Generate_InterpreterEnterBytecode(masm); |
+} |
+ |
+void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { |
+ Generate_InterpreterEnterBytecode(masm); |
+} |
+ |
void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- rax : argument count (preserved for callee) |