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

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

Issue 1707133003: [Interpreter] Fix deopt when accumulator needs to be materialized. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and add test Created 4 years, 10 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/x64/builtins-x64.cc ('k') | test/mjsunit/compiler/deopt-materialize-accumulator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
index a56950296470dbd1e5e1e4999a4a9226cd5994eb..16030e28602633a9a15a9606373f0b2988fb8818 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/x87/builtins-x87.cc
@@ -802,22 +802,20 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Enter an internal frame.
{
FrameScope scope(masm, StackFrame::INTERNAL);
- __ Push(kInterpreterAccumulatorRegister); // Save accumulator register.
// Pass the deoptimization type to the runtime system.
__ Push(Smi::FromInt(static_cast<int>(type)));
-
__ CallRuntime(Runtime::kNotifyDeoptimized);
-
- __ Pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
}
- // Drop state (we don't use these for interpreter deopts) and push PC at top
+ // Drop state (we don't use these for interpreter deopts) and and pop the
+ // accumulator value into the accumulator register and push PC at top
// of stack (to simulate initial call to bytecode handler in interpreter entry
// trampoline).
__ Pop(ebx);
__ Drop(1);
+ __ Pop(kInterpreterAccumulatorRegister);
__ Push(ebx);
// Enter the bytecode dispatch.
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/mjsunit/compiler/deopt-materialize-accumulator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698