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

Unified Diff: pkg/compiler/lib/src/types/masks.dart

Issue 2563443007: Reduce use of Compiler.closedWorld (Closed)
Patch Set: Created 4 years 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/ssa/value_range_analyzer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/masks.dart
diff --git a/pkg/compiler/lib/src/types/masks.dart b/pkg/compiler/lib/src/types/masks.dart
index 5cbc4c06dd4df6cc21b90139b16c48b01614fad6..43e06009ef1e95e351919ac7f2cfd0053a92074c 100644
--- a/pkg/compiler/lib/src/types/masks.dart
+++ b/pkg/compiler/lib/src/types/masks.dart
@@ -61,6 +61,12 @@ class CommonMasks {
TypeMask _syncStarIterableType;
TypeMask _asyncFutureType;
TypeMask _asyncStarStreamType;
+ TypeMask _indexablePrimitiveType;
+ TypeMask _readableArrayType;
+ TypeMask _mutableArrayType;
+ TypeMask _fixedArrayType;
+ TypeMask _extendableArrayType;
+ TypeMask _unmodifiableArrayType;
TypeMask get dynamicType => _dynamicType ??=
new TypeMask.subclass(closedWorld.coreClasses.objectClass, closedWorld);
@@ -132,4 +138,29 @@ class CommonMasks {
// TODO(johnniwinther): Assert that the null type has been resolved.
TypeMask get nullType => _nullType ??= const TypeMask.empty();
+
+ TypeMask get emptyType => const TypeMask.nonNullEmpty();
+
+ TypeMask get indexablePrimitiveType =>
+ _indexablePrimitiveType ??= new TypeMask.nonNullSubtype(
+ backendClasses.indexableImplementation, closedWorld);
+
+ TypeMask get readableArrayType =>
+ _readableArrayType ??= new TypeMask.nonNullSubclass(
+ backendClasses.listImplementation, closedWorld);
+
+ TypeMask get mutableArrayType =>
+ _mutableArrayType ??= new TypeMask.nonNullSubclass(
+ backendClasses.mutableListImplementation, closedWorld);
+
+ TypeMask get fixedArrayType => _fixedArrayType ??= new TypeMask.nonNullExact(
+ backendClasses.fixedListImplementation, closedWorld);
+
+ TypeMask get extendableArrayType =>
+ _extendableArrayType ??= new TypeMask.nonNullExact(
+ backendClasses.growableListImplementation, closedWorld);
+
+ TypeMask get unmodifiableArrayType =>
+ _unmodifiableArrayType ??= new TypeMask.nonNullExact(
+ backendClasses.constListImplementation, closedWorld);
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/value_range_analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698