Index: runtime/vm/constant_propagator.cc |
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc |
index efff680f2b5d194e4f052b32f35a7636f0752655..0c765f273b9d43b8797365a94a9d8e5f9bae281c 100644 |
--- a/runtime/vm/constant_propagator.cc |
+++ b/runtime/vm/constant_propagator.cc |
@@ -803,6 +803,11 @@ void ConstantPropagator::VisitLoadField(LoadFieldInstr* instr) { |
Smi::New(Array::Cast(constant->value()).Length()))); |
return; |
} |
+ if (constant->value().IsTypedData()) { |
+ SetValue(instr, Smi::ZoneHandle(I, |
+ Smi::New(TypedData::Cast(constant->value()).Length()))); |
+ return; |
+ } |
} |
} |
SetValue(instr, non_constant_); |