Index: runtime/vm/intermediate_language_arm.cc |
=================================================================== |
--- runtime/vm/intermediate_language_arm.cc (revision 45502) |
+++ runtime/vm/intermediate_language_arm.cc (working copy) |
@@ -1580,7 +1580,10 @@ |
const intptr_t field_cid = field().guarded_cid(); |
const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
- ASSERT(field_cid != kDynamicCid); |
+ if (field_cid == kDynamicCid) { |
+ ASSERT(!compiler->is_optimizing()); |
+ return; // Nothing to emit. |
+ } |
const bool emit_full_guard = |
!compiler->is_optimizing() || (field_cid == kIllegalCid); |
@@ -1732,7 +1735,10 @@ |
void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- ASSERT(field().guarded_list_length() != Field::kNoFixedLength); |
+ if (field().guarded_list_length() == Field::kNoFixedLength) { |
+ ASSERT(!compiler->is_optimizing()); |
+ return; // Nothing to emit. |
+ } |
Label* deopt = compiler->is_optimizing() ? |
compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |