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

Unified Diff: runtime/vm/instructions_dbc.cc

Issue 2743903002: Revert "Do not rely on code patching on DBC for lazy deoptimization." (Closed)
Patch Set: Created 3 years, 9 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/instructions_dbc.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_dbc.cc
diff --git a/runtime/vm/instructions_dbc.cc b/runtime/vm/instructions_dbc.cc
index 3559fbfeb9caa6db7cffe129480b90124178744d..7667a5f2b6b56f2bc0e92ca08f05303c21be9cc8 100644
--- a/runtime/vm/instructions_dbc.cc
+++ b/runtime/vm/instructions_dbc.cc
@@ -168,6 +168,14 @@ void CallPattern::SetTargetCode(const Code& target_code) const {
}
+void CallPattern::InsertDeoptCallAt(uword pc) {
+ const uint8_t argc = Bytecode::IsCallOpcode(Bytecode::At(pc))
+ ? Bytecode::DecodeArgc(Bytecode::At(pc))
+ : 0;
+ *reinterpret_cast<Instr*>(pc) = Bytecode::Encode(Bytecode::kDeopt, argc, 0);
+}
+
+
SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
: object_pool_(ObjectPool::Handle(code.GetObjectPool())),
data_pool_index_(-1),
« no previous file with comments | « runtime/vm/instructions_dbc.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698