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

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

Issue 26662006: Changed LinkedHashSet to Set and LinkedHashMap to Map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: HashMap -> Map. Created 7 years, 2 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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Set<Node> get superUses; 9 Set<Node> get superUses;
10 10
(...skipping 25 matching lines...) Expand all
36 */ 36 */
37 bool isTypeLiteral(Send node); 37 bool isTypeLiteral(Send node);
38 38
39 /// Register additional dependencies required by [currentElement]. 39 /// Register additional dependencies required by [currentElement].
40 /// For example, elements that are used by a backend. 40 /// For example, elements that are used by a backend.
41 void registerDependency(Element element); 41 void registerDependency(Element element);
42 } 42 }
43 43
44 class TreeElementMapping implements TreeElements { 44 class TreeElementMapping implements TreeElements {
45 final Element currentElement; 45 final Element currentElement;
46 final Map<Spannable, Selector> selectors = 46 final Map<Spannable, Selector> selectors = new Map<Spannable, Selector>();
47 new LinkedHashMap<Spannable, Selector>(); 47 final Map<Node, DartType> types = new Map<Node, DartType>();
48 final Map<Node, DartType> types = new LinkedHashMap<Node, DartType>(); 48 final Set<Node> superUses = new Set<Node>();
49 final Set<Node> superUses = new LinkedHashSet<Node>(); 49 final Set<Element> otherDependencies = new Set<Element>();
50 final Set<Element> otherDependencies = new LinkedHashSet<Element>();
51 final Map<Node, Constant> constants = new Map<Node, Constant>(); 50 final Map<Node, Constant> constants = new Map<Node, Constant>();
52 final int hashCode = ++hashCodeCounter; 51 final int hashCode = ++hashCodeCounter;
53 static int hashCodeCounter = 0; 52 static int hashCodeCounter = 0;
54 53
55 TreeElementMapping(this.currentElement); 54 TreeElementMapping(this.currentElement);
56 55
57 operator []=(Node node, Element element) { 56 operator []=(Node node, Element element) {
58 assert(invariant(node, () { 57 assert(invariant(node, () {
59 FunctionExpression functionExpression = node.asFunctionExpression(); 58 FunctionExpression functionExpression = node.asFunctionExpression();
60 if (functionExpression != null) { 59 if (functionExpression != null) {
(...skipping 4478 matching lines...) Expand 10 before | Expand all | Expand 10 after
4539 return finishConstructorReference(visit(expression), 4538 return finishConstructorReference(visit(expression),
4540 expression, expression); 4539 expression, expression);
4541 } 4540 }
4542 } 4541 }
4543 4542
4544 /// Looks up [name] in [scope] and unwraps the result. 4543 /// Looks up [name] in [scope] and unwraps the result.
4545 Element lookupInScope(Compiler compiler, Node node, 4544 Element lookupInScope(Compiler compiler, Node node,
4546 Scope scope, SourceString name) { 4545 Scope scope, SourceString name) {
4547 return Elements.unwrap(scope.lookup(name), compiler, node); 4546 return Elements.unwrap(scope.lookup(name), compiler, node);
4548 } 4547 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698