| Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| index 35abf1ce879121bac08a65ded890548d4548ad89..36ddfa55cd3ca54374ce24368dfc1ac24e4d4d9a 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| @@ -1738,10 +1738,12 @@ class JavaScriptBackend extends Backend {
|
| }
|
|
|
| bool couldBeTypedArray(TypeMask mask) {
|
| - TypeMask indexing = new TypeMask.subtype(jsIndexingBehaviorInterface);
|
| - // Checking if [mask] contains [indexing] means that we want to
|
| - // know if [mask] is not a more specific type than [indexing].
|
| - return isTypedArray(mask) || mask.containsMask(indexing, compiler);
|
| + bool intersects(TypeMask type1, TypeMask type2) =>
|
| + !type1.intersection(type2, compiler).isEmpty;
|
| +
|
| + return compiler.typedDataClass != null
|
| + && intersects(mask, new TypeMask.subtype(compiler.typedDataClass))
|
| + && intersects(mask, new TypeMask.subtype(jsIndexingBehaviorInterface));
|
| }
|
|
|
| /// Returns all static fields that are referenced through [targetsUsed].
|
|
|