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

Unified Diff: lib/compiler/implementation/ssa/ssa.dart

Issue 10834061: Resolve typedefs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated scope handling and type resolution Created 8 years, 5 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: lib/compiler/implementation/ssa/ssa.dart
diff --git a/lib/compiler/implementation/ssa/ssa.dart b/lib/compiler/implementation/ssa/ssa.dart
index d8e0b6bedc651ce2e0cfa76bdcbe09f7ab3c51fb..dbcf4918b84e5105ec09cae43b4b56e65ee2187c 100644
--- a/lib/compiler/implementation/ssa/ssa.dart
+++ b/lib/compiler/implementation/ssa/ssa.dart
@@ -32,22 +32,25 @@ class RuntimeTypeInformation {
String asJsString(InterfaceType type) {
ClassElement element = type.element;
StringBuffer buffer = new StringBuffer();
- Link<Type> arguments = type.arguments;
- int index = 0;
- element.typeParameters.forEach((name, _) {
- buffer.add("${name.slowToString()}: '${arguments.head}'");
- if (++index < element.typeParameters.length) {
+ Link<Type> arguments = type.typeArguments;
+ Link<TypeVariableType> typeVariables = element.typeVariables;
+ while (!typeVariables.isEmpty()) {
+ TypeVariableType typeVariable = typeVariables.head;
+ buffer.add("${typeVariable}: '${arguments.head}'");
+
+ typeVariables = typeVariables.tail;
+ if (!typeVariables.isEmpty()) {
buffer.add(', ');
}
- });
+ }
return "{$buffer}";
}
bool hasTypeArguments(Type type) {
if (type is InterfaceType) {
InterfaceType interfaceType = type;
- return (!interfaceType.arguments.isEmpty() &&
- interfaceType.arguments.tail.isEmpty());
+ return (!interfaceType.typeArguments.isEmpty() &&
+ interfaceType.typeArguments.tail.isEmpty());
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698