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'); |