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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/world.dart

Issue 11413219: Canonicalize raw type (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js; 5 part of dart2js;
6 6
7 class World { 7 class World {
8 final Compiler compiler; 8 final Compiler compiler;
9 final Map<ClassElement, Set<ClassElement>> subtypes; 9 final Map<ClassElement, Set<ClassElement>> subtypes;
10 final Map<ClassElement, Set<ClassElement>> typesImplementedBySubclasses; 10 final Map<ClassElement, Set<ClassElement>> typesImplementedBySubclasses;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 Set<ClassElement> classes = subtypes[cls]; 69 Set<ClassElement> classes = subtypes[cls];
70 if (classes == null) return; 70 if (classes == null) return;
71 classes.forEach((ClassElement sub) { 71 classes.forEach((ClassElement sub) {
72 potentiallyAddForRti(sub, callback); 72 potentiallyAddForRti(sub, callback);
73 }); 73 });
74 } 74 }
75 75
76 compiler.resolverWorld.isChecks.forEach((DartType type) { 76 compiler.resolverWorld.isChecks.forEach((DartType type) {
77 if (type is InterfaceType) { 77 if (type is InterfaceType) {
78 InterfaceType itf = type; 78 InterfaceType itf = type;
79 if (!itf.typeArguments.isEmpty) { 79 if (!itf.isRaw) {
80 potentiallyAddForRti(itf.element, null); 80 potentiallyAddForRti(itf.element, null);
81 } 81 }
82 } 82 }
83 }); 83 });
84 84
85 List<ClassElement> worklist = 85 List<ClassElement> worklist =
86 new List<ClassElement>.from(classesNeedingRti); 86 new List<ClassElement>.from(classesNeedingRti);
87 while (!worklist.isEmpty) { 87 while (!worklist.isEmpty) {
88 Element e = worklist.removeLast(); 88 Element e = worklist.removeLast();
89 Set<Element> dependencies = rtiDependencies[e]; 89 Set<Element> dependencies = rtiDependencies[e];
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 final SourceString name; 220 final SourceString name;
221 221
222 MemberSet(SourceString this.name) : elements = new Set<Element>(); 222 MemberSet(SourceString this.name) : elements = new Set<Element>();
223 223
224 void add(Element element) { 224 void add(Element element) {
225 elements.add(element); 225 elements.add(element);
226 } 226 }
227 227
228 bool get isEmpty => elements.isEmpty; 228 bool get isEmpty => elements.isEmpty;
229 } 229 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698