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 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 CallStructure; | 10 import '../universe/call_structure.dart' show CallStructure; |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 } | 468 } |
469 | 469 |
470 String visitFunction(FunctionConstantValue constant, _) { | 470 String visitFunction(FunctionConstantValue constant, _) { |
471 return '(Function "${constant.toDartText()}")'; | 471 return '(Function "${constant.toDartText()}")'; |
472 } | 472 } |
473 | 473 |
474 String visitNull(NullConstantValue constant, _) { | 474 String visitNull(NullConstantValue constant, _) { |
475 return '(Null)'; | 475 return '(Null)'; |
476 } | 476 } |
477 | 477 |
478 String visitNonConstant(NonConstantValue constant, _) { | |
479 return '(NonConstant)'; | |
480 } | |
481 | |
482 String visitInt(IntConstantValue constant, _) { | 478 String visitInt(IntConstantValue constant, _) { |
483 return '(Int ${constant.toDartText()})'; | 479 return '(Int ${constant.toDartText()})'; |
484 } | 480 } |
485 | 481 |
486 String visitDouble(DoubleConstantValue constant, _) { | 482 String visitDouble(DoubleConstantValue constant, _) { |
487 return '(Double ${constant.toDartText()})'; | 483 return '(Double ${constant.toDartText()})'; |
488 } | 484 } |
489 | 485 |
490 String visitBool(BoolConstantValue constant, _) { | 486 String visitBool(BoolConstantValue constant, _) { |
491 return '(Bool ${constant.toDartText()})'; | 487 return '(Bool ${constant.toDartText()})'; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 void setReturnContinuation(Continuation node) { | 561 void setReturnContinuation(Continuation node) { |
566 assert(!_names.containsKey(node) || _names[node] == 'return'); | 562 assert(!_names.containsKey(node) || _names[node] == 'return'); |
567 _names[node] = 'return'; | 563 _names[node] = 'return'; |
568 } | 564 } |
569 | 565 |
570 String getName(Node node) { | 566 String getName(Node node) { |
571 if (!_names.containsKey(node)) return 'MISSING_NAME'; | 567 if (!_names.containsKey(node)) return 'MISSING_NAME'; |
572 return _names[node]; | 568 return _names[node]; |
573 } | 569 } |
574 } | 570 } |
OLD | NEW |