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

Side by Side Diff: pkg/compiler/lib/src/resolution/tree_elements.dart

Issue 1433443002: Remove for-in selectors from TreeElements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove unneeded code. Created 5 years, 1 month 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.resolution.tree_elements; 5 library dart2js.resolution.tree_elements;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 27 matching lines...) Expand all
38 DartType getType(Node node); 38 DartType getType(Node node);
39 TypeMask getTypeMask(Node node); 39 TypeMask getTypeMask(Node node);
40 TypeMask getGetterTypeMaskInComplexSendSet(SendSet node); 40 TypeMask getGetterTypeMaskInComplexSendSet(SendSet node);
41 TypeMask getOperatorTypeMaskInComplexSendSet(SendSet node); 41 TypeMask getOperatorTypeMaskInComplexSendSet(SendSet node);
42 void setTypeMask(Node node, TypeMask mask); 42 void setTypeMask(Node node, TypeMask mask);
43 void setGetterTypeMaskInComplexSendSet(SendSet node, TypeMask mask); 43 void setGetterTypeMaskInComplexSendSet(SendSet node, TypeMask mask);
44 void setOperatorTypeMaskInComplexSendSet(SendSet node, TypeMask mask); 44 void setOperatorTypeMaskInComplexSendSet(SendSet node, TypeMask mask);
45 45
46 /// Returns the for-in loop variable for [node]. 46 /// Returns the for-in loop variable for [node].
47 Element getForInVariable(ForIn node); 47 Element getForInVariable(ForIn node);
48 Selector getIteratorSelector(ForIn node);
49 Selector getMoveNextSelector(ForIn node);
50 Selector getCurrentSelector(ForIn node);
51 TypeMask getIteratorTypeMask(ForIn node); 48 TypeMask getIteratorTypeMask(ForIn node);
52 TypeMask getMoveNextTypeMask(ForIn node); 49 TypeMask getMoveNextTypeMask(ForIn node);
53 TypeMask getCurrentTypeMask(ForIn node); 50 TypeMask getCurrentTypeMask(ForIn node);
54 void setIteratorTypeMask(ForIn node, TypeMask mask); 51 void setIteratorTypeMask(ForIn node, TypeMask mask);
55 void setMoveNextTypeMask(ForIn node, TypeMask mask); 52 void setMoveNextTypeMask(ForIn node, TypeMask mask);
56 void setCurrentTypeMask(ForIn node, TypeMask mask); 53 void setCurrentTypeMask(ForIn node, TypeMask mask);
57 void setConstant(Node node, ConstantExpression constant); 54 void setConstant(Node node, ConstantExpression constant);
58 ConstantExpression getConstant(Node node); 55 ConstantExpression getConstant(Node node);
59 56
60 /// Returns the [FunctionElement] defined by [node]. 57 /// Returns the [FunctionElement] defined by [node].
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 213 }
217 214
218 void setOperatorSelectorInComplexSendSet(SendSet node, Selector selector) { 215 void setOperatorSelectorInComplexSendSet(SendSet node, Selector selector) {
219 _setSelector(node.assignmentOperator, selector); 216 _setSelector(node.assignmentOperator, selector);
220 } 217 }
221 218
222 Selector getOperatorSelectorInComplexSendSet(SendSet node) { 219 Selector getOperatorSelectorInComplexSendSet(SendSet node) {
223 return _getSelector(node.assignmentOperator); 220 return _getSelector(node.assignmentOperator);
224 } 221 }
225 222
226 // The following methods set selectors on the "for in" node. Since
227 // we're using three selectors, we need to use children of the node,
228 // and we arbitrarily choose which ones.
229
230 void setIteratorSelector(ForIn node, Selector selector) {
231 _setSelector(node, selector);
232 }
233
234 Selector getIteratorSelector(ForIn node) {
235 return _getSelector(node);
236 }
237
238 void setMoveNextSelector(ForIn node, Selector selector) {
239 _setSelector(node.forToken, selector);
240 }
241
242 Selector getMoveNextSelector(ForIn node) {
243 return _getSelector(node.forToken);
244 }
245
246 void setCurrentSelector(ForIn node, Selector selector) {
247 _setSelector(node.inToken, selector);
248 }
249
250 Selector getCurrentSelector(ForIn node) {
251 return _getSelector(node.inToken);
252 }
253
254 Element getForInVariable(ForIn node) { 223 Element getForInVariable(ForIn node) {
255 return this[node]; 224 return this[node];
256 } 225 }
257 226
258 void setConstant(Node node, ConstantExpression constant) { 227 void setConstant(Node node, ConstantExpression constant) {
259 if (_constants == null) { 228 if (_constants == null) {
260 _constants = new Maplet<Node, ConstantExpression>(); 229 _constants = new Maplet<Node, ConstantExpression>();
261 } 230 }
262 _constants[node] = constant; 231 _constants[node] = constant;
263 } 232 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 449 }
481 450
482 void setCurrentTypeMask(ForIn node, TypeMask mask) { 451 void setCurrentTypeMask(ForIn node, TypeMask mask) {
483 _setTypeMask(node.inToken, mask); 452 _setTypeMask(node.inToken, mask);
484 } 453 }
485 454
486 TypeMask getCurrentTypeMask(ForIn node) { 455 TypeMask getCurrentTypeMask(ForIn node) {
487 return _getTypeMask(node.inToken); 456 return _getTypeMask(node.inToken);
488 } 457 }
489 } 458 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698