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

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

Issue 2514323005: Revert "Update third_party/pkg/kernel version" (Closed)
Patch Set: Created 4 years, 1 month 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 | « DEPS ('k') | pkg/compiler/lib/src/kernel/kernel_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel.dart b/pkg/compiler/lib/src/kernel/kernel.dart
index cd741883868b3cde4b780c763d590bc77bf43764..a4da817105cfa24f20e753a8a52328715ddd54a7 100644
--- a/pkg/compiler/lib/src/kernel/kernel.dart
+++ b/pkg/compiler/lib/src/kernel/kernel.dart
@@ -192,11 +192,11 @@ class Kernel {
fields: null);
addWork(cls, () {
if (cls.supertype != null) {
- classNode.supertype = supertypeToIr(cls.supertype);
+ classNode.supertype = interfaceTypeToIr(cls.supertype);
}
if (cls.isMixinApplication) {
MixinApplicationElement mixinApplication = cls;
- classNode.mixedInType = supertypeToIr(mixinApplication.mixinType);
+ classNode.mixedInType = interfaceTypeToIr(mixinApplication.mixinType);
}
classNode.parent = libraryToIr(cls.library);
if (cls.isUnnamedMixinApplication) {
@@ -222,10 +222,10 @@ class Kernel {
}
});
classNode.typeParameters.addAll(typeVariablesToIr(cls.typeVariables));
- for (ir.Supertype supertype
- in supertypesToIr(cls.interfaces.reverse().toList())) {
- if (supertype != classNode.mixedInType) {
- classNode.implementedTypes.add(supertype);
+ for (ir.InterfaceType interface
+ in typesToIr(cls.interfaces.reverse().toList())) {
+ if (interface != classNode.mixedInType) {
+ classNode.implementedTypes.add(interface);
}
}
addWork(cls, () {
@@ -284,15 +284,6 @@ class Kernel {
}
}
- ir.Supertype supertypeToIr(InterfaceType type) {
- ir.Class cls = classToIr(type.element);
- if (type.typeArguments.isEmpty) {
- return cls.asRawSupertype;
- } else {
- return new ir.Supertype(cls, typesToIr(type.typeArguments));
- }
- }
-
// TODO(ahe): Remove this method when dart2js support generic type arguments.
List<ir.TypeParameter> typeParametersNotImplemented() {
return const <ir.TypeParameter>[];
@@ -304,10 +295,11 @@ class Kernel {
List<ir.DartType> positionalParameters =
new List<ir.DartType>.from(typesToIr(type.parameterTypes))
..addAll(typesToIr(type.optionalParameterTypes));
- List<ir.NamedType> namedParameters = new List<ir.NamedType>.generate(
- type.namedParameters.length,
- (i) => new ir.NamedType(
- type.namedParameters[i], typeToIr(type.namedParameterTypes[i])));
+ Map<String, ir.DartType> namedParameters = <String, ir.DartType>{};
+ for (int i = 0; i < type.namedParameters.length; i++) {
+ namedParameters[type.namedParameters[i]] =
+ typeToIr(type.namedParameterTypes[i]);
+ }
ir.DartType returnType = typeToIr(type.returnType);
return new ir.FunctionType(positionalParameters, returnType,
@@ -328,14 +320,6 @@ class Kernel {
return result;
}
- List<ir.Supertype> supertypesToIr(List<InterfaceType> types) {
- List<ir.Supertype> result = new List<ir.Supertype>(types.length);
- for (int i = 0; i < types.length; i++) {
- result[i] = supertypeToIr(types[i]);
- }
- return result;
- }
-
ir.DartType typeToIr(DartType type) {
switch (type.kind) {
case TypeKind.FUNCTION:
« no previous file with comments | « DEPS ('k') | pkg/compiler/lib/src/kernel/kernel_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698