Index: runtime/vm/stub_code_ia32.cc |
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc |
index ce6521d339ddb381173946cb60d402c2210b8d9d..ca70617824bf92fbfc39004256c45e44bdd276ba 100644 |
--- a/runtime/vm/stub_code_ia32.cc |
+++ b/runtime/vm/stub_code_ia32.cc |
@@ -351,6 +351,8 @@ static void PushArgumentsArray(Assembler* assembler) { |
// +------------------+ |
// | return-address | (deoptimization point) |
// +------------------+ |
+// | Saved CODE_REG | |
+// +------------------+ |
// | ... | <- SP of optimized frame |
// |
// Parts of the code cannot GC, part of the code can GC. |
@@ -460,16 +462,15 @@ static void GenerateDeoptimizationSequence(Assembler* assembler, |
__ popl(ECX); // Pop return address. |
__ addl(ESP, EBX); // Remove materialization arguments. |
__ pushl(ECX); // Push return address. |
- // The caller is responsible for emitting the return instruction. |
+ __ ret(); |
} |
// EAX: result, must be preserved |
void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { |
// Return address for "call" to deopt stub. |
- __ pushl(Immediate(kZapReturnAddress)); |
+ __ pushl(Immediate(0xe1e1e1e1)); |
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn); |
- __ ret(); |
} |
@@ -477,15 +478,13 @@ void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { |
// EDX: stacktrace, must be preserved |
void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) { |
// Return address for "call" to deopt stub. |
- __ pushl(Immediate(kZapReturnAddress)); |
+ __ pushl(Immediate(0xe1e1e1e1)); |
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow); |
- __ ret(); |
} |
void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
GenerateDeoptimizationSequence(assembler, kEagerDeopt); |
- __ ret(); |
} |
@@ -1836,22 +1835,6 @@ void StubCode::GenerateRunExceptionHandlerStub(Assembler* assembler) { |
} |
-// Deoptimize a frame on the call stack before rewinding. |
-// The arguments are stored in the Thread object. |
-// No result. |
-void StubCode::GenerateDeoptForRewindStub(Assembler* assembler) { |
- // Push the deopt pc. |
- __ pushl(Address(THR, Thread::resume_pc_offset())); |
- GenerateDeoptimizationSequence(assembler, kEagerDeopt); |
- |
- // After we have deoptimized, jump to the correct frame. |
- __ EnterStubFrame(); |
- __ CallRuntime(kRewindPostDeoptRuntimeEntry, 0); |
- __ LeaveFrame(); |
- __ int3(); |
-} |
- |
- |
// Calls to the runtime to optimize the given function. |
// EBX: function to be reoptimized. |
// EDX: argument descriptor (preserved). |