Chromium Code Reviews| 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..e05fc5eb3ff578f294e0d3792873f8d4593faa7e 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| @@ -1738,10 +1738,11 @@ 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 |
|
floitsch
2014/02/04 22:13:51
New line after the nested function.
|
| + && intersects(mask, new TypeMask.subtype(compiler.typedDataClass)) |
| + && intersects(mask, new TypeMask.subtype(jsIndexingBehaviorInterface)); |
| } |
| /// Returns all static fields that are referenced through [targetsUsed]. |