Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1402913003: Avoid creating invalid TypeMask.nonNullExact (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/elements/common.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 080328ff34136702257fecf37bcf491592c6f7ba..cece45f17f2e583d242a6db43a6a2ffac2188887 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -5729,13 +5729,13 @@ class SsaBuilder extends ast.Visitor
bool isLength = selector.isGetter
&& selector.name == "length";
if (isLength || selector.isIndex) {
- TypeMask type = new TypeMask.nonNullExact(
- element.enclosingClass.declaration, compiler.world);
- return type.satisfies(backend.jsIndexableClass, compiler.world);
+ return compiler.world.isSubtypeOf(
+ element.enclosingClass.declaration,
+ backend.jsIndexableClass);
} else if (selector.isIndexSet) {
- TypeMask type = new TypeMask.nonNullExact(
- element.enclosingClass.declaration, compiler.world);
- return type.satisfies(backend.jsMutableIndexableClass, compiler.world);
+ return compiler.world.isSubtypeOf(
+ element.enclosingClass.declaration,
+ backend.jsMutableIndexableClass);
} else {
return false;
}
« no previous file with comments | « pkg/compiler/lib/src/elements/common.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698