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

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

Issue 1950913004: [Interpreter] Fix bytecode offset for stack overflows. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Also fixes error-to-sttring-stack-overflow.html Created 4 years, 7 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 | « src/arm64/builtins-arm64.cc ('k') | src/mips/builtins-mips.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 31f56461eec9e230c2f3a5b4a9b55934873135c8..d985edbb3fa88770f6019cf0628287b77d22e17d 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -572,8 +572,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// Push bytecode array.
__ push(kInterpreterBytecodeArrayRegister);
- // Push zero for bytecode array offset.
- __ push(Immediate(0));
+ // Push Smi tagged initial bytecode array offset.
+ __ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag)));
// Allocate the local and temporary register file on the stack.
{
@@ -606,11 +606,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ j(greater_equal, &loop_header);
}
- // Load accumulator, register file, bytecode offset, dispatch table into
- // registers.
+ // Load accumulator, bytecode offset and dispatch table into registers.
__ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
- __ mov(edx, ebp);
- __ add(edx, Immediate(InterpreterFrameConstants::kRegisterFileFromFp));
__ mov(kInterpreterBytecodeOffsetRegister,
Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag));
__ mov(kInterpreterDispatchTableRegister,
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698