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

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

Issue 1512543002: [Interpreter] Save bytecode offset in interpreter stack frames. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ia32 and rebase Created 5 years 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/frames.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index 9a01fb96f53f7ec7b72e5808c02fcf089ee8757e..bb192eb7b89c4237a231c7fdf953fa73975d685e 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -522,6 +522,9 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ push(edi); // Callee's JS function.
__ push(edx); // Callee's new target.
+ // Push zero for bytecode array offset.
+ __ push(Immediate(0));
+
// Get the bytecode array from the function object and load the pointer to the
// first entry into edi (InterpreterBytecodeRegister).
__ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
@@ -591,9 +594,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// registers.
__ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
__ mov(kInterpreterRegisterFileRegister, ebp);
- __ sub(kInterpreterRegisterFileRegister,
- Immediate(2 * kPointerSize +
- StandardFrameConstants::kFixedFrameSizeFromFp));
+ __ add(kInterpreterRegisterFileRegister,
+ Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp));
__ mov(kInterpreterBytecodeOffsetRegister,
Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag));
// Since the dispatch table root might be set after builtins are generated,
@@ -617,6 +619,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// and header removal.
__ add(ebx, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ call(ebx);
+ __ nop(); // Ensure that return address still counts as interpreter entry
+ // trampoline.
}
« no previous file with comments | « src/frames.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698