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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 2382953004: Revert "Lazy deopt without code patching." (Closed)
Patch Set: Created 4 years, 3 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/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index be1f46625813c45415b54337ed95728b23a08b7b..de6db702434fe4f22652ae9c35b658c28563908e 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -547,27 +547,29 @@ static void GenerateDeoptimizationSequence(Assembler* assembler,
__ Ret();
}
+// RA: return address + call-instruction-size
// V0: result, must be preserved
void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) {
+ // Correct return address to point just after the call that is being
+ // deoptimized.
+ __ AddImmediate(RA, -CallPattern::kDeoptCallLengthInBytes);
// Push zap value instead of CODE_REG for lazy deopt.
__ LoadImmediate(TMP, 0xf1f1f1f1);
__ Push(TMP);
- // Return address for "call" to deopt stub.
- __ LoadImmediate(RA, 0xe1e1e1e1);
- __ lw(CODE_REG, Address(THR, Thread::lazy_deopt_from_return_stub_offset()));
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn);
}
+// RA: return address + call-instruction-size
// V0: exception, must be preserved
// V1: stacktrace, must be preserved
void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) {
+ // Correct return address to point just after the call that is being
+ // deoptimized.
+ __ AddImmediate(RA, -CallPattern::kDeoptCallLengthInBytes);
// Push zap value instead of CODE_REG for lazy deopt.
__ LoadImmediate(TMP, 0xf1f1f1f1);
__ Push(TMP);
- // Return address for "call" to deopt stub.
- __ LoadImmediate(RA, 0xe1e1e1e1);
- __ lw(CODE_REG, Address(THR, Thread::lazy_deopt_from_throw_stub_offset()));
GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow);
}
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698