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..148a98ab93e2a419684cd9576f2a9ee2b8869611 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,14 @@ void Environment::DropArguments(intptr_t argc) { |
} |
+EMIT_NATIVE_CODE(CheckSmi, 1) { |
+ __ CheckSmi(locs()->in(0).reg()); |
+ compiler->AddDeoptWithoutStub(deopt_id(), |
+ ICData::kDeoptCheckSmi, |
+ licm_hoisted_ ? ICData::kHoisted : 0); |
+ __ Deopt(0, deopt_id()); |
Vyacheslav Egorov (Google)
2016/06/09 15:09:06
I would prefer to write this as
compiler->EmitDe
zra
2016/06/09 16:42:23
Done.
|
+} |
+ |
} // namespace dart |
#endif // defined TARGET_ARCH_DBC |