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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart

Issue 1559233002: WIP: Compute constant expressions in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 library dart2js.ir_nodes_sexpr; 5 library dart2js.ir_nodes_sexpr;
6 6
7 import '../constants/values.dart'; 7 import '../constants/values.dart';
8 import '../util/util.dart'; 8 import '../util/util.dart';
9 import 'cps_ir_nodes.dart'; 9 import 'cps_ir_nodes.dart';
10 import '../universe/call_structure.dart' show 10 import '../universe/call_structure.dart' show
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 String visitFunction(FunctionConstantValue constant, _) { 400 String visitFunction(FunctionConstantValue constant, _) {
401 return '(Function "${constant.unparse()}")'; 401 return '(Function "${constant.unparse()}")';
402 } 402 }
403 403
404 String visitNull(NullConstantValue constant, _) { 404 String visitNull(NullConstantValue constant, _) {
405 return '(Null)'; 405 return '(Null)';
406 } 406 }
407 407
408 String visitNonConstant(NonConstantValue constant, _) {
409 return '(NonConstant)';
410 }
411
408 String visitInt(IntConstantValue constant, _) { 412 String visitInt(IntConstantValue constant, _) {
409 return '(Int ${constant.unparse()})'; 413 return '(Int ${constant.unparse()})';
410 } 414 }
411 415
412 String visitDouble(DoubleConstantValue constant, _) { 416 String visitDouble(DoubleConstantValue constant, _) {
413 return '(Double ${constant.unparse()})'; 417 return '(Double ${constant.unparse()})';
414 } 418 }
415 419
416 String visitBool(BoolConstantValue constant, _) { 420 String visitBool(BoolConstantValue constant, _) {
417 return '(Bool ${constant.unparse()})'; 421 return '(Bool ${constant.unparse()})';
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 void setReturnContinuation(Continuation node) { 495 void setReturnContinuation(Continuation node) {
492 assert(!_names.containsKey(node) || _names[node] == 'return'); 496 assert(!_names.containsKey(node) || _names[node] == 'return');
493 _names[node] = 'return'; 497 _names[node] = 'return';
494 } 498 }
495 499
496 String getName(Node node) { 500 String getName(Node node) {
497 if (!_names.containsKey(node)) return 'MISSING_NAME'; 501 if (!_names.containsKey(node)) return 'MISSING_NAME';
498 return _names[node]; 502 return _names[node];
499 } 503 }
500 } 504 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/constants/values.dart ('k') | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698