OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// [ResolutionRegistry] collects all resolution information. It stores node | 7 /// [ResolutionRegistry] collects all resolution information. It stores node |
8 /// related information in a [TreeElements] mapping and registers calls with | 8 /// related information in a [TreeElements] mapping and registers calls with |
9 /// [Backend], [World] and [Enqueuer]. | 9 /// [Backend], [World] and [Enqueuer]. |
10 // TODO(johnniwinther): Split this into an interface and implementation class. | 10 // TODO(johnniwinther): Split this into an interface and implementation class. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 void setType(Node node, DartType type) => mapping.setType(node, type); | 109 void setType(Node node, DartType type) => mapping.setType(node, type); |
110 | 110 |
111 DartType getType(Node node) => mapping.getType(node); | 111 DartType getType(Node node) => mapping.getType(node); |
112 | 112 |
113 ////////////////////////////////////////////////////////////////////////////// | 113 ////////////////////////////////////////////////////////////////////////////// |
114 // Node-to-Constant mapping functionality. | 114 // Node-to-Constant mapping functionality. |
115 ////////////////////////////////////////////////////////////////////////////// | 115 ////////////////////////////////////////////////////////////////////////////// |
116 | 116 |
117 ConstExp getConstant(Node node) => mapping.getConstant(node); | 117 ConstantExpression getConstant(Node node) => mapping.getConstant(node); |
118 | 118 |
119 ////////////////////////////////////////////////////////////////////////////// | 119 ////////////////////////////////////////////////////////////////////////////// |
120 // Target/Label functionality. | 120 // Target/Label functionality. |
121 ////////////////////////////////////////////////////////////////////////////// | 121 ////////////////////////////////////////////////////////////////////////////// |
122 | 122 |
123 /// Register [node] to be the declaration of [label]. | 123 /// Register [node] to be the declaration of [label]. |
124 void defineLabel(Label node, LabelDefinition label) { | 124 void defineLabel(Label node, LabelDefinition label) { |
125 mapping.defineLabel(node, label); | 125 mapping.defineLabel(node, label); |
126 } | 126 } |
127 | 127 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 365 |
366 void registerAssert(Send node) { | 366 void registerAssert(Send node) { |
367 mapping.setAssert(node); | 367 mapping.setAssert(node); |
368 backend.resolutionCallbacks.onAssert(node, this); | 368 backend.resolutionCallbacks.onAssert(node, this); |
369 } | 369 } |
370 | 370 |
371 bool isAssert(Send node) { | 371 bool isAssert(Send node) { |
372 return mapping.isAssert(node); | 372 return mapping.isAssert(node); |
373 } | 373 } |
374 } | 374 } |
OLD | NEW |