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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 2392613002: Reapply "Lazy deopt without code patching." (Closed)
Patch Set: . Created 4 years, 2 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 | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 8af9e5a0e209c4c19360d5f097bd664aec2a0168..fa370caa6509ef49d5dbcf59243ae58e14bdbb3d 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -536,29 +536,27 @@ static void GenerateDeoptimizationSequence(Assembler* assembler,
}
-// LR: return address + call-instruction-size
// R0: result, must be preserved
void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) {
- // Correct return address to point just after the call that is being
- // deoptimized.
- __ AddImmediate(LR, -CallPattern::DeoptCallPatternLengthInBytes());
// Push zap value instead of CODE_REG for lazy deopt.
__ LoadImmediate(IP, 0xf1f1f1f1);
__ Push(IP);
+ // Return address for "call" to deopt stub.
+ __ LoadImmediate(LR, 0xe1e1e1e1);
+ __ ldr(CODE_REG, Address(THR, Thread::lazy_deopt_from_return_stub_offset()));
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn);
}
-// LR: return address + call-instruction-size
// R0: exception, must be preserved
// R1: stacktrace, must be preserved
void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) {
- // Correct return address to point just after the call that is being
- // deoptimized.
- __ AddImmediate(LR, -CallPattern::DeoptCallPatternLengthInBytes());
// Push zap value instead of CODE_REG for lazy deopt.
__ LoadImmediate(IP, 0xf1f1f1f1);
__ Push(IP);
+ // Return address for "call" to deopt stub.
+ __ LoadImmediate(LR, 0xe1e1e1e1);
+ __ ldr(CODE_REG, Address(THR, Thread::lazy_deopt_from_throw_stub_offset()));
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow);
}
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698