| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |