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

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

Issue 10825177: Unify ClassElement and TypedefElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cfa5a16b2db9ddf16a6796929c64b4bcb0b864b1 100644
--- a/lib/compiler/implementation/ssa/ssa.dart
+++ b/lib/compiler/implementation/ssa/ssa.dart
@@ -33,13 +33,17 @@ class RuntimeTypeInformation {
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> typeVariables = element.typeVariables;
+ while (!typeVariables.isEmpty()) {
+ TypeVariableType typeVariable = typeVariables.head;
+ // TODO(johnniwinther): Retrieve the type name properly and not through
+ // [toString]. Note: Two cases below [typeVariable] and [arguments.head].
+ buffer.add("${typeVariable}: '${arguments.head}'");
+ typeVariables = typeVariables.tail;
+ if (!typeVariables.isEmpty()) {
buffer.add(', ');
}
- });
+ }
return "{$buffer}";
}
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698