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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 1922173003: Adds LoadClassIdInstr to DBC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/intermediate_language_dbc.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 7329114a00f6fe899e2b76a7f240d0ef8362ae50..8ece205725f2b46223e623b1c5ac10b1b2334e1b 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -1778,6 +1778,21 @@ RawObject* Simulator::Call(const Code& code,
}
{
+ BYTECODE(LoadClassId, A_D);
+ const uint16_t object_reg = rD;
+ RawObject* obj = static_cast<RawObject*>(FP[object_reg]);
+ FP[rA] = SimulatorHelpers::GetClassIdAsSmi(obj);
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(LoadClassIdTOS, 0);
+ RawObject* obj = static_cast<RawObject*>(SP[0]);
+ SP[0] = SimulatorHelpers::GetClassIdAsSmi(obj);
+ DISPATCH();
+ }
+
+ {
BYTECODE(StoreIndexedTOS, 0);
SP -= 3;
RawArray* array = static_cast<RawArray*>(SP[1]);
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698