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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2149993006: DBC: Make unoptimized static calls call through ICData (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« runtime/vm/isolate_reload.cc ('K') | « runtime/vm/isolate_reload.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 4102e8f1c71ec4182193bbafa51e30ba6e9e47df..506c0a783d89abc1024269dde8944b72f344d674 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -1386,8 +1386,15 @@ RawObject* Simulator::Call(const Code& code,
// Invoke target function.
{
const uint16_t argc = rA;
+ RawObject* ic_data_obj = LOAD_CONSTANT(Bytecode::DecodeD(*pc));
Vyacheslav Egorov (Google) 2016/07/18 13:52:46 pc++ to skip NOP?
zra 2016/07/18 17:38:47 No more NOP after other changes.
RawObject** call_base = SP - argc;
RawObject** call_top = SP; // *SP contains function
+ if (ic_data_obj != null_value) {
+ RawICData* ic_data = RAW_CAST(ICData, ic_data_obj);
+ RawArray* cache = ic_data->ptr()->ic_data_->ptr();
+ *SP = cache->data()[ICData::TargetIndexFor(
+ ic_data->ptr()->state_bits_ & 0x3)];
+ }
argdesc = static_cast<RawArray*>(LOAD_CONSTANT(rD));
Invoke(thread, call_base, call_top, &pp, &pc, &FP, &SP);
}
@@ -1396,6 +1403,16 @@ RawObject* Simulator::Call(const Code& code,
}
{
+ BYTECODE(OptimizedStaticCall, A_D);
+ const uint16_t argc = rA;
+ RawObject** call_base = SP - argc;
+ RawObject** call_top = SP; // *SP contains function
+ argdesc = static_cast<RawArray*>(LOAD_CONSTANT(rD));
+ Invoke(thread, call_base, call_top, &pp, &pc, &FP, &SP);
+ DISPATCH();
+ }
+
+ {
BYTECODE(InstanceCall1, A_D);
// Check if single stepping.
« runtime/vm/isolate_reload.cc ('K') | « runtime/vm/isolate_reload.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698