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

Unified Diff: runtime/vm/instructions_dbc.cc

Issue 1992963002: Enable optimizer pipeline for DBC. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 years, 7 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
Index: runtime/vm/instructions_dbc.cc
diff --git a/runtime/vm/instructions_dbc.cc b/runtime/vm/instructions_dbc.cc
index ec7945f44c9271ae350b41e970cb9fd911233bad..3656722a54e31e4a55e6061c18f6ec1b57ed98a9 100644
--- a/runtime/vm/instructions_dbc.cc
+++ b/runtime/vm/instructions_dbc.cc
@@ -114,9 +114,10 @@ static bool HasLoadFromPool(Instr instr) {
case Bytecode::kLoadConstant:
case Bytecode::kPushConstant:
case Bytecode::kStaticCall:
- case Bytecode::kInstanceCall:
+ case Bytecode::kInstanceCall1:
case Bytecode::kInstanceCall2:
- case Bytecode::kInstanceCall3:
+ case Bytecode::kInstanceCall1Opt:
+ case Bytecode::kInstanceCall2Opt:
case Bytecode::kStoreStaticTOS:
case Bytecode::kPushStatic:
case Bytecode::kAllocate:
@@ -165,7 +166,9 @@ void CallPattern::SetTargetCode(const Code& target_code) const {
void CallPattern::InsertDeoptCallAt(uword pc, uword target_address) {
- UNIMPLEMENTED();
+ 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);
}

Powered by Google App Engine
This is Rietveld 408576698