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

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

Issue 1170673002: Begin to compute constant expressions in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix BinaryConstantExpression.getKnownType Created 5 years, 6 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
OLDNEW
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 void setType(Node node, DartType type) => mapping.setType(node, type); 272 void setType(Node node, DartType type) => mapping.setType(node, type);
273 273
274 DartType getType(Node node) => mapping.getType(node); 274 DartType getType(Node node) => mapping.getType(node);
275 275
276 ////////////////////////////////////////////////////////////////////////////// 276 //////////////////////////////////////////////////////////////////////////////
277 // Node-to-Constant mapping functionality. 277 // Node-to-Constant mapping functionality.
278 ////////////////////////////////////////////////////////////////////////////// 278 //////////////////////////////////////////////////////////////////////////////
279 279
280 ConstantExpression getConstant(Node node) => mapping.getConstant(node); 280 ConstantExpression getConstant(Node node) => mapping.getConstant(node);
281 281
282 void setConstant(Node node, ConstantExpression constant) {
283 mapping.setConstant(node, constant);
284 }
285
282 ////////////////////////////////////////////////////////////////////////////// 286 //////////////////////////////////////////////////////////////////////////////
283 // Target/Label functionality. 287 // Target/Label functionality.
284 ////////////////////////////////////////////////////////////////////////////// 288 //////////////////////////////////////////////////////////////////////////////
285 289
286 /// Register [node] to be the declaration of [label]. 290 /// Register [node] to be the declaration of [label].
287 void defineLabel(Label node, LabelDefinition label) { 291 void defineLabel(Label node, LabelDefinition label) {
288 mapping.defineLabel(node, label); 292 mapping.defineLabel(node, label);
289 } 293 }
290 294
291 /// Undefine the label of [node]. 295 /// Undefine the label of [node].
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 555 }
552 556
553 void registerAsyncMarker(FunctionElement element) { 557 void registerAsyncMarker(FunctionElement element) {
554 backend.registerAsyncMarker(element, world, this); 558 backend.registerAsyncMarker(element, world, this);
555 } 559 }
556 560
557 void registerAsyncForIn(AsyncForIn node) { 561 void registerAsyncForIn(AsyncForIn node) {
558 backend.resolutionCallbacks.onAsyncForIn(node, this); 562 backend.resolutionCallbacks.onAsyncForIn(node, this);
559 } 563 }
560 } 564 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698