| Index: lib/compiler/implementation/ssa/nodes.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/ssa/nodes.dart (revision 13038)
|
| +++ lib/compiler/implementation/ssa/nodes.dart (working copy)
|
| @@ -833,6 +833,7 @@
|
| bool isReadableArray(HTypeMap types) => types[this].isReadableArray();
|
| bool isMutableArray(HTypeMap types) => types[this].isMutableArray();
|
| bool isExtendableArray(HTypeMap types) => types[this].isExtendableArray();
|
| + bool isFixedArray(HTypeMap types) => types[this].isFixedArray();
|
| bool isBoolean(HTypeMap types) => types[this].isBoolean();
|
| bool isInteger(HTypeMap types) => types[this].isInteger();
|
| bool isDouble(HTypeMap types) => types[this].isDouble();
|
| @@ -1432,11 +1433,11 @@
|
| if (isLengthGetterOnStringOrArray(types)) {
|
| setUseGvn();
|
| clearAllSideEffects();
|
| - // If the input is a string, we know the length cannot change.
|
| - // We cannot do the same thing for non-extendable array because
|
| - // we don't express that type yet: a mutable array might be
|
| - // extendable.
|
| - if (!inputs[1].isString(types)) setDependsOnSomething();
|
| + // If the input is a string or a fixed length array, we know
|
| + // the length cannot change.
|
| + if (!inputs[1].isString(types) && !inputs[1].isFixedArray(types)) {
|
| + setDependsOnSomething();
|
| + }
|
| } else if (isSideEffectFree) {
|
| setUseGvn();
|
| clearAllSideEffects();
|
|
|