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

Unified Diff: pkg/compiler/lib/src/common/backend_api.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/world.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/backend_api.dart
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index 258a38f1c443c73303653a75207575d1051debc8..b93ddee2e33d5d7b2668ece891442df34a0243f6 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -64,6 +64,9 @@ abstract class Backend extends Target {
return const SourceInformationStrategy();
}
+ /// Common classes used by the backend.
+ BackendClasses get backendClasses;
+
/// Interface for serialization of backend specific data.
BackendSerialization get serialization => const BackendSerialization();
@@ -182,34 +185,6 @@ abstract class Backend extends Target {
void registerConstSymbol(String name) {}
- bool isNullImplementation(ClassElement cls) {
- return cls == compiler.coreClasses.nullClass;
- }
-
- ClassElement get intImplementation => compiler.coreClasses.intClass;
- ClassElement get doubleImplementation => compiler.coreClasses.doubleClass;
- ClassElement get numImplementation => compiler.coreClasses.numClass;
- ClassElement get stringImplementation => compiler.coreClasses.stringClass;
- ClassElement get listImplementation => compiler.coreClasses.listClass;
- ClassElement get growableListImplementation => compiler.coreClasses.listClass;
- ClassElement get fixedListImplementation => compiler.coreClasses.listClass;
- ClassElement get constListImplementation => compiler.coreClasses.listClass;
- ClassElement get mapImplementation => compiler.coreClasses.mapClass;
- ClassElement get constMapImplementation => compiler.coreClasses.mapClass;
- ClassElement get functionImplementation => compiler.coreClasses.functionClass;
- ClassElement get typeImplementation => compiler.coreClasses.typeClass;
- ClassElement get boolImplementation => compiler.coreClasses.boolClass;
- ClassElement get nullImplementation => compiler.coreClasses.nullClass;
- ClassElement get uint32Implementation => compiler.coreClasses.intClass;
- ClassElement get uint31Implementation => compiler.coreClasses.intClass;
- ClassElement get positiveIntImplementation => compiler.coreClasses.intClass;
- ClassElement get syncStarIterableImplementation =>
- compiler.coreClasses.iterableClass;
- ClassElement get asyncFutureImplementation =>
- compiler.coreClasses.futureClass;
- ClassElement get asyncStarStreamImplementation =>
- compiler.coreClasses.streamClass;
-
ClassElement defaultSuperclass(ClassElement element) {
return compiler.coreClasses.objectClass;
}
@@ -411,3 +386,27 @@ class BackendSerialization {
SerializerPlugin get serializer => const SerializerPlugin();
DeserializerPlugin get deserializer => const DeserializerPlugin();
}
+
+/// Interface providing access to core classes used by the backend.
+abstract class BackendClasses {
+ ClassElement get intImplementation;
+ ClassElement get doubleImplementation;
+ ClassElement get numImplementation;
+ ClassElement get stringImplementation;
+ ClassElement get listImplementation;
+ ClassElement get growableListImplementation;
+ ClassElement get fixedListImplementation;
+ ClassElement get constListImplementation;
+ ClassElement get mapImplementation;
+ ClassElement get constMapImplementation;
+ ClassElement get functionImplementation;
+ ClassElement get typeImplementation;
+ ClassElement get boolImplementation;
+ ClassElement get nullImplementation;
+ ClassElement get uint32Implementation;
+ ClassElement get uint31Implementation;
+ ClassElement get positiveIntImplementation;
+ ClassElement get syncStarIterableImplementation;
+ ClassElement get asyncFutureImplementation;
+ ClassElement get asyncStarStreamImplementation;
+}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/world.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698