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

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

Issue 2370833002: Replace ClosedWorld.backend with ClosedWorld.backendClasses (Closed)
Patch Set: Created 4 years, 3 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
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 ba090f69064ba8929d6f998df7a91198327ab6e2..9f59ad5a4b204893637e04df185dc42bac1f3e9a 100644
--- a/pkg/compiler/lib/src/types/masks.dart
+++ b/pkg/compiler/lib/src/types/masks.dart
@@ -5,7 +5,7 @@
library masks;
import '../common.dart';
-import '../common/backend_api.dart' show Backend;
+import '../common/backend_api.dart' show BackendClasses;
import '../compiler.dart' show Compiler;
import '../constants/values.dart' show PrimitiveConstantValue;
import '../elements/elements.dart';
@@ -18,7 +18,7 @@ import '../universe/universe.dart'
UniverseSelectorConstraints,
SelectorConstraintsStrategy;
import '../util/util.dart';
-import '../world.dart' show ClosedWorld, ClosedWorld;
+import '../world.dart' show ClosedWorld;
import 'abstract_value_domain.dart' show AbstractValue;
part 'container_type_mask.dart';
@@ -39,6 +39,8 @@ class CommonMasks {
ClosedWorld get closedWorld => compiler.closedWorld;
+ BackendClasses get backendClasses => closedWorld.backendClasses;
+
TypeMask _dynamicType;
TypeMask _nonNullType;
TypeMask _nullType;
@@ -69,66 +71,66 @@ class CommonMasks {
closedWorld.coreClasses.objectClass, closedWorld);
TypeMask get intType => _intType ??= new TypeMask.nonNullSubclass(
- compiler.backend.intImplementation, closedWorld);
+ backendClasses.intImplementation, closedWorld);
TypeMask get uint32Type => _uint32Type ??= new TypeMask.nonNullSubclass(
- compiler.backend.uint32Implementation, closedWorld);
+ backendClasses.uint32Implementation, closedWorld);
TypeMask get uint31Type => _uint31Type ??= new TypeMask.nonNullExact(
- compiler.backend.uint31Implementation, closedWorld);
+ backendClasses.uint31Implementation, closedWorld);
TypeMask get positiveIntType =>
_positiveIntType ??= new TypeMask.nonNullSubclass(
- compiler.backend.positiveIntImplementation, closedWorld);
+ backendClasses.positiveIntImplementation, closedWorld);
TypeMask get doubleType => _doubleType ??= new TypeMask.nonNullExact(
- compiler.backend.doubleImplementation, closedWorld);
+ backendClasses.doubleImplementation, closedWorld);
TypeMask get numType => _numType ??= new TypeMask.nonNullSubclass(
- compiler.backend.numImplementation, closedWorld);
+ backendClasses.numImplementation, closedWorld);
- TypeMask get boolType => _boolType ??= new TypeMask.nonNullExact(
- compiler.backend.boolImplementation, closedWorld);
+ TypeMask get boolType => _boolType ??=
+ new TypeMask.nonNullExact(backendClasses.boolImplementation, closedWorld);
TypeMask get functionType => _functionType ??= new TypeMask.nonNullSubtype(
- compiler.backend.functionImplementation, closedWorld);
+ backendClasses.functionImplementation, closedWorld);
- TypeMask get listType => _listType ??= new TypeMask.nonNullExact(
- compiler.backend.listImplementation, closedWorld);
+ TypeMask get listType => _listType ??=
+ new TypeMask.nonNullExact(backendClasses.listImplementation, closedWorld);
TypeMask get constListType => _constListType ??= new TypeMask.nonNullExact(
- compiler.backend.constListImplementation, closedWorld);
+ backendClasses.constListImplementation, closedWorld);
TypeMask get fixedListType => _fixedListType ??= new TypeMask.nonNullExact(
- compiler.backend.fixedListImplementation, closedWorld);
+ backendClasses.fixedListImplementation, closedWorld);
TypeMask get growableListType =>
_growableListType ??= new TypeMask.nonNullExact(
- compiler.backend.growableListImplementation, closedWorld);
+ backendClasses.growableListImplementation, closedWorld);
TypeMask get mapType => _mapType ??= new TypeMask.nonNullSubtype(
- compiler.backend.mapImplementation, closedWorld);
+ backendClasses.mapImplementation, closedWorld);
TypeMask get constMapType => _constMapType ??= new TypeMask.nonNullSubtype(
- compiler.backend.constMapImplementation, closedWorld);
+ backendClasses.constMapImplementation, closedWorld);
TypeMask get stringType => _stringType ??= new TypeMask.nonNullExact(
- compiler.backend.stringImplementation, closedWorld);
+ backendClasses.stringImplementation, closedWorld);
- TypeMask get typeType => _typeType ??= new TypeMask.nonNullExact(
- compiler.backend.typeImplementation, closedWorld);
+ TypeMask get typeType => _typeType ??=
+ new TypeMask.nonNullExact(backendClasses.typeImplementation, closedWorld);
TypeMask get syncStarIterableType =>
_syncStarIterableType ??= new TypeMask.nonNullExact(
- compiler.backend.syncStarIterableImplementation, closedWorld);
+ backendClasses.syncStarIterableImplementation, closedWorld);
TypeMask get asyncFutureType =>
_asyncFutureType ??= new TypeMask.nonNullExact(
- compiler.backend.asyncFutureImplementation, closedWorld);
+ backendClasses.asyncFutureImplementation, closedWorld);
TypeMask get asyncStarStreamType =>
_asyncStarStreamType ??= new TypeMask.nonNullExact(
- compiler.backend.asyncStarStreamImplementation, closedWorld);
+ backendClasses.asyncStarStreamImplementation, closedWorld);
// TODO(johnniwinther): Assert that the null type has been resolved.
TypeMask get nullType => _nullType ??= const TypeMask.empty();

Powered by Google App Engine
This is Rietveld 408576698