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

Unified Diff: lib/compiler/implementation/ssa/codegen.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/resolver.dart ('k') | lib/compiler/implementation/ssa/ssa.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index f9618acb09f095f284ea38eda5b77116c8318f99..1ef09f150366d92b7012dd2e92fe84fd3cc3afb6 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -2575,13 +2575,17 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
Link<Type> arguments = interfaceType.arguments;
buffer.add(' && ');
checkObject(node.typeInfoCall, '===');
- cls.typeParameters.forEach((name, _) {
+ for (TypeVariableType typeVariable in cls.typeVariables) {
buffer.add(' && ');
beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
use(node.typeInfoCall, JSPrecedence.EQUALITY_PRECEDENCE);
- buffer.add(".${name.slowToString()} === '${arguments.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}'");
endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
- });
+ }
}
if (node.nullOk) {
expectedPrecedence = oldPrecedence;
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698