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

Unified Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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.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 4af998e6a78edb5d9df89bc7aea2ed1ca7584bb1..0e1afc637a52de73e7ebfecb5d0475cae0c60142 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -108,7 +108,6 @@ DECLARE_FLAG(int, optimization_counter_threshold);
M(UnboxInteger32) \
M(CheckedSmiOp) \
M(CheckArrayBound) \
- M(CheckSmi) \
M(CheckClassId) \
M(CheckClass) \
M(BinarySmiOp) \
@@ -850,8 +849,12 @@ Representation LoadIndexedInstr::representation() const {
Representation StoreIndexedInstr::RequiredInputRepresentation(
intptr_t idx) const {
// Array can be a Dart object or a pointer to external data.
- if (idx == 0) return kNoRepresentation; // Flexible input representation.
- if (idx == 1) return kTagged; // Index is a smi.
+ if (idx == 0) {
+ return kNoRepresentation; // Flexible input representation.
+ }
+ if (idx == 1) {
+ return kTagged; // Index is a smi.
+ }
ASSERT(idx == 2);
switch (class_id_) {
case kArrayCid:
@@ -903,6 +906,13 @@ void Environment::DropArguments(intptr_t argc) {
}
+EMIT_NATIVE_CODE(CheckSmi, 1) {
+ __ CheckSmi(locs()->in(0).reg());
+ compiler->EmitDeopt(deopt_id(),
+ ICData::kDeoptCheckSmi,
+ licm_hoisted_ ? ICData::kHoisted : 0);
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_DBC
« no previous file with comments | « runtime/vm/instructions_dbc.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698