Index: runtime/vm/stub_code_x64.cc |
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc |
index 0341f268f80c2de6cae68d9a28c65721deed2864..167154b0879d8c515d929e4a1b98c2cff9935c90 100644 |
--- a/runtime/vm/stub_code_x64.cc |
+++ b/runtime/vm/stub_code_x64.cc |
@@ -498,19 +498,18 @@ static void GenerateDeoptimizationSequence(Assembler* assembler, |
__ popq(RCX); // Pop return address. |
__ addq(RSP, RBX); // Remove materialization arguments. |
__ pushq(RCX); // Push return address. |
- // The caller is responsible for emitting the return instruction. |
+ __ ret(); |
} |
// RAX: result, must be preserved |
void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { |
// Push zap value instead of CODE_REG for lazy deopt. |
- __ pushq(Immediate(kZapCodeReg)); |
+ __ pushq(Immediate(0xf1f1f1f1)); |
// Return address for "call" to deopt stub. |
- __ pushq(Immediate(kZapReturnAddress)); |
+ __ pushq(Immediate(0xe1e1e1e1)); |
__ movq(CODE_REG, Address(THR, Thread::lazy_deopt_from_return_stub_offset())); |
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn); |
- __ ret(); |
} |
@@ -518,18 +517,16 @@ void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { |
// RDX: stacktrace, must be preserved |
void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) { |
// Push zap value instead of CODE_REG for lazy deopt. |
- __ pushq(Immediate(kZapCodeReg)); |
+ __ pushq(Immediate(0xf1f1f1f1)); |
// Return address for "call" to deopt stub. |
- __ pushq(Immediate(kZapReturnAddress)); |
+ __ pushq(Immediate(0xe1e1e1e1)); |
__ movq(CODE_REG, Address(THR, Thread::lazy_deopt_from_throw_stub_offset())); |
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow); |
- __ ret(); |
} |
void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
GenerateDeoptimizationSequence(assembler, kEagerDeopt); |
- __ ret(); |
} |
@@ -1894,25 +1891,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 zap value instead of CODE_REG. |
- __ pushq(Immediate(kZapCodeReg)); |
- |
- // Push the deopt pc. |
- __ pushq(Address(THR, Thread::resume_pc_offset())); |
- GenerateDeoptimizationSequence(assembler, kEagerDeopt); |
- |
- // After we have deoptimized, jump to the correct frame. |
- __ EnterStubFrame(); |
- __ CallRuntime(kRewindPostDeoptRuntimeEntry, 0); |
- __ LeaveStubFrame(); |
- __ int3(); |
-} |
- |
- |
// Calls to the runtime to optimize the given function. |
// RDI: function to be reoptimized. |
// R10: argument descriptor (preserved). |