| 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 | 10 import '../universe/call_structure.dart' show |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 360 } |
| 361 | 361 |
| 362 @override | 362 @override |
| 363 String visitAwait(Await node) { | 363 String visitAwait(Await node) { |
| 364 String value = access(node.input); | 364 String value = access(node.input); |
| 365 String continuation = access(node.continuation); | 365 String continuation = access(node.continuation); |
| 366 return '(Await $value $continuation)'; | 366 return '(Await $value $continuation)'; |
| 367 } | 367 } |
| 368 | 368 |
| 369 @override | 369 @override |
| 370 String visitYield(Yield node) { |
| 371 String value = access(node.input); |
| 372 String continuation = access(node.continuation); |
| 373 return '(Yield $value $continuation)'; |
| 374 } |
| 375 |
| 370 String visitRefinement(Refinement node) { | 376 String visitRefinement(Refinement node) { |
| 371 String value = access(node.value); | 377 String value = access(node.value); |
| 372 return '(Refinement $value ${node.type})'; | 378 return '(Refinement $value ${node.type})'; |
| 373 } | 379 } |
| 374 } | 380 } |
| 375 | 381 |
| 376 class ConstantStringifier extends ConstantValueVisitor<String, Null> { | 382 class ConstantStringifier extends ConstantValueVisitor<String, Null> { |
| 377 // Some of these methods are unimplemented because we haven't had a need | 383 // Some of these methods are unimplemented because we haven't had a need |
| 378 // to print such constants. When printing is implemented, the corresponding | 384 // to print such constants. When printing is implemented, the corresponding |
| 379 // parsing support should be added to SExpressionUnstringifier.parseConstant | 385 // parsing support should be added to SExpressionUnstringifier.parseConstant |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 void setReturnContinuation(Continuation node) { | 484 void setReturnContinuation(Continuation node) { |
| 479 assert(!_names.containsKey(node) || _names[node] == 'return'); | 485 assert(!_names.containsKey(node) || _names[node] == 'return'); |
| 480 _names[node] = 'return'; | 486 _names[node] = 'return'; |
| 481 } | 487 } |
| 482 | 488 |
| 483 String getName(Node node) { | 489 String getName(Node node) { |
| 484 if (!_names.containsKey(node)) return 'MISSING_NAME'; | 490 if (!_names.containsKey(node)) return 'MISSING_NAME'; |
| 485 return _names[node]; | 491 return _names[node]; |
| 486 } | 492 } |
| 487 } | 493 } |
| OLD | NEW |