| Index: runtime/vm/flow_graph_optimizer.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_optimizer.cc (revision 16324)
|
| +++ runtime/vm/flow_graph_optimizer.cc (working copy)
|
| @@ -1782,8 +1782,6 @@
|
| CheckArrayBoundInstr* check);
|
| Definition* LoadArrayLength(CheckArrayBoundInstr* check);
|
|
|
| -
|
| -
|
| // Replace uses of the definition def that are dominated by instruction dom
|
| // with uses of other definition.
|
| void RenameDominatedUses(Definition* def,
|
| @@ -2140,7 +2138,7 @@
|
| // It will only be used in range boundaries.
|
| LoadFieldInstr* length_load = new LoadFieldInstr(
|
| check->array()->Copy(),
|
| - Array::length_offset(),
|
| + CheckArrayBoundInstr::LengthOffsetFor(check->array_type()),
|
| Type::ZoneHandle(Type::SmiType()),
|
| true); // Immutable.
|
| length_load->set_recognized_kind(MethodRecognizer::kObjectArrayLength);
|
| @@ -2157,8 +2155,7 @@
|
|
|
| void RangeAnalysis::ConstrainValueAfterCheckArrayBound(
|
| Definition* defn, CheckArrayBoundInstr* check) {
|
| - if ((check->array_type() != kArrayCid) &&
|
| - (check->array_type() != kImmutableArrayCid)) {
|
| + if (!CheckArrayBoundInstr::IsFixedLengthArrayType(check->array_type())) {
|
| return;
|
| }
|
|
|
|
|