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

Unified Diff: pkg/compiler/lib/src/common_elements.dart

Issue 2813093002: Remove BackendClasses and JavaScriptBackendClasses. (Closed)
Patch Set: . Created 3 years, 8 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/common/backend_api.dart ('k') | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index b5f615169f6ade11b40ae177d6ab2eade2fd0d0a..9348ec0a40f95ce2d3ed7195780f597b0cf278ee 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -262,6 +262,8 @@ class CommonElements {
/// The `Type` type defined in 'dart:core'.
InterfaceType get typeType => _getRawType(typeClass);
+ InterfaceType get typeLiteralType => _getRawType(typeLiteralClass);
+
/// The `StackTrace` type defined in 'dart:core';
InterfaceType get stackTraceType => _getRawType(stackTraceClass);
@@ -376,6 +378,32 @@ class CommonElements {
return _env.createInterfaceType(cls, typeArguments);
}
+ InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
+ {bool hasProtoKey: false, bool onlyStringKeys: false}) {
+ ClassEntity classElement = onlyStringKeys
+ ? (hasProtoKey ? constantProtoMapClass : constantStringMapClass)
+ : generalConstantMapClass;
+ List<DartType> typeArgument = sourceType.typeArguments;
+ if (sourceType.treatAsRaw) {
+ return _env.getRawType(classElement);
+ } else {
+ return _env.createInterfaceType(classElement, typeArgument);
+ }
+ }
+
+ FieldEntity get symbolField => symbolImplementationField;
+
+ InterfaceType get symbolImplementationType =>
+ _env.getRawType(symbolImplementationClass);
+
+ bool isDefaultEqualityImplementation(MemberEntity element) {
+ assert(element.name == '==');
+ ClassEntity classElement = element.enclosingClass;
+ return classElement == objectClass ||
+ classElement == jsInterceptorClass ||
+ classElement == jsNullClass;
+ }
+
// From dart:core
FunctionEntity get malformedTypeError =>
_cachedCoreHelper('_malformedTypeError');
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698