| 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 universe; | |
| 6 | |
| 7 class PartialTypeTree { | 5 class PartialTypeTree { |
| 8 | 6 |
| 9 final Compiler compiler; | 7 final Compiler compiler; |
| 10 PartialTypeTreeNode root; | 8 PartialTypeTreeNode root; |
| 11 | 9 |
| 12 // TODO(kasperl): This should be final but the VM will not allow | 10 // TODO(kasperl): This should be final but the VM will not allow |
| 13 // that without making the map a compile-time constant. | 11 // that without making the map a compile-time constant. |
| 14 Map<ClassElement, PartialTypeTreeNode> nodes = | 12 Map<ClassElement, PartialTypeTreeNode> nodes = |
| 15 new Map<ClassElement, PartialTypeTreeNode>(); | 13 new Map<ClassElement, PartialTypeTreeNode>(); |
| 16 | 14 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 bool visitRecursively(bool visit(PartialTypeTreeNode node)) { | 168 bool visitRecursively(bool visit(PartialTypeTreeNode node)) { |
| 171 if (!visit(this)) return false; | 169 if (!visit(this)) return false; |
| 172 for (Link link = children; !link.isEmpty(); link = link.tail) { | 170 for (Link link = children; !link.isEmpty(); link = link.tail) { |
| 173 PartialTypeTreeNode child = link.head; | 171 PartialTypeTreeNode child = link.head; |
| 174 if (!child.visitRecursively(visit)) return false; | 172 if (!child.visitRecursively(visit)) return false; |
| 175 } | 173 } |
| 176 return true; | 174 return true; |
| 177 } | 175 } |
| 178 | 176 |
| 179 } | 177 } |
| OLD | NEW |