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

Side by Side Diff: lib/compiler/implementation/universe/function_set.dart

Issue 10964016: Change the type inference for fields in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final round of changes Created 8 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 // TODO(kasperl): This actually holds getters and setters just fine 5 // TODO(kasperl): This actually holds getters and setters just fine
6 // too and stricly they aren't functions. Maybe this needs a better 6 // too and stricly they aren't functions. Maybe this needs a better
7 // name -- something like ElementSet seems a bit too generic. 7 // name -- something like ElementSet seems a bit too generic.
8 class FunctionSet extends PartialTypeTree { 8 class FunctionSet extends PartialTypeTree {
9 9
10 FunctionSet(Compiler compiler) : super(compiler); 10 FunctionSet(Compiler compiler) : super(compiler);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return true; 116 return true;
117 }); 117 });
118 return result; 118 return result;
119 } 119 }
120 120
121 void forEach(Function f) { 121 void forEach(Function f) {
122 if (root === null) return; 122 if (root === null) return;
123 root.visitRecursively((FunctionSetNode node) { 123 root.visitRecursively((FunctionSetNode node) {
124 node.membersByName.forEach( 124 node.membersByName.forEach(
125 (SourceString _, Element element) => f(element)); 125 (SourceString _, Element element) => f(element));
126 return true; 126 return true;
127 }); 127 });
128 } 128 }
129 } 129 }
130 130
131 class FunctionSetNode extends PartialTypeTreeNode { 131 class FunctionSetNode extends PartialTypeTreeNode {
132 132
133 final Map<SourceString, Element> membersByName; 133 final Map<SourceString, Element> membersByName;
134 134
135 FunctionSetNode(ClassElement type) : super(type), 135 FunctionSetNode(ClassElement type) : super(type),
136 membersByName = new Map<SourceString, Element>(); 136 membersByName = new Map<SourceString, Element>();
137 137
138 } 138 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/optimize.dart ('k') | lib/compiler/implementation/universe/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698