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

Unified Diff: runtime/vm/intermediate_language_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/flow_graph_builder.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_dbc.cc
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc
index 293d2395550e75960a99b242cab4984f6554a64f..7c87f8eeee622b3e76e7a1824240af0d6a9e634c 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -108,15 +108,15 @@ DECLARE_FLAG(int, optimization_counter_threshold);
M(UnboxInteger32) \
M(CheckedSmiOp) \
M(CheckArrayBound) \
- M(CheckSmi) \
- M(LoadClassId) \
- M(CheckClassId) \
- M(CheckClass) \
- M(BinarySmiOp) \
- M(TestSmi) \
- M(RelationalOp) \
- M(EqualityCompare) \
- M(LoadIndexed) \
+ M(CheckSmi) \
+ M(CheckClassId) \
+ M(CheckClass) \
+ M(BinarySmiOp) \
+ M(TestSmi) \
+ M(RelationalOp) \
+ M(EqualityCompare) \
+ M(LoadIndexed)
+
// Location summaries actually are not used by the unoptimizing DBC compiler
// because we don't allocate any registers.
static LocationSummary* CreateLocationSummary(Zone* zone,
@@ -238,6 +238,15 @@ EMIT_NATIVE_CODE(StoreLocal, 0, false) {
}
+EMIT_NATIVE_CODE(LoadClassId, 1, true) {
+ if (compiler->is_optimizing()) {
+ __ LoadClassId(locs()->out(0).reg(), locs()->in(0).reg());
+ } else {
+ __ LoadClassIdTOS();
+ }
+}
+
+
EMIT_NATIVE_CODE(Constant, 0, true) {
const intptr_t kidx = __ AddConstant(value());
if (compiler->is_optimizing()) {
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698