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

Side by Side Diff: lib/compiler/implementation/js_backend/partial_type_tree.dart

Issue 10911007: Rename Type to DartType to avoid conflicts with the class Type in the core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 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 class PartialTypeTree { 5 class PartialTypeTree {
6 6
7 final Compiler compiler; 7 final Compiler compiler;
8 PartialTypeTreeNode root; 8 PartialTypeTreeNode root;
9 9
10 PartialTypeTree(this.compiler); 10 PartialTypeTree(this.compiler);
11 11
12 abstract PartialTypeTreeNode newNode(ClassElement type); 12 abstract PartialTypeTreeNode newNode(ClassElement type);
13 13
14 // TODO(kasperl): Move this to the Selector class? 14 // TODO(kasperl): Move this to the Selector class?
15 ClassElement selectorType(Selector selector) { 15 ClassElement selectorType(Selector selector) {
16 Type type = selector.receiverType; 16 DartType type = selector.receiverType;
17 return (type !== null) ? type.element : compiler.objectClass; 17 return (type !== null) ? type.element : compiler.objectClass;
18 } 18 }
19 19
20 /** 20 /**
21 * Finds the tree node corresponding to the given [type]. If [insert] 21 * Finds the tree node corresponding to the given [type]. If [insert]
22 * is true, we always return a node that matches the type by 22 * is true, we always return a node that matches the type by
23 * inserting a new node if necessary. If [insert] is false, we 23 * inserting a new node if necessary. If [insert] is false, we
24 * return null if we cannot find a node that matches the [type]. 24 * return null if we cannot find a node that matches the [type].
25 */ 25 */
26 PartialTypeTreeNode findNode(ClassElement type, bool insert) { 26 PartialTypeTreeNode findNode(ClassElement type, bool insert) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 bool visitRecursively(bool visit(PartialTypeTreeNode node)) { 120 bool visitRecursively(bool visit(PartialTypeTreeNode node)) {
121 if (!visit(this)) return false; 121 if (!visit(this)) return false;
122 for (Link link = children; !link.isEmpty(); link = link.tail) { 122 for (Link link = children; !link.isEmpty(); link = link.tail) {
123 PartialTypeTreeNode child = link.head; 123 PartialTypeTreeNode child = link.head;
124 if (!child.visitRecursively(visit)) return false; 124 if (!child.visitRecursively(visit)) return false;
125 } 125 }
126 return true; 126 return true;
127 } 127 }
128 128
129 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698