| 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 | 10 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 322 |
| 323 String visitIdentical(Identical node) { | 323 String visitIdentical(Identical node) { |
| 324 String left = access(node.left); | 324 String left = access(node.left); |
| 325 String right = access(node.right); | 325 String right = access(node.right); |
| 326 return '(Identical $left $right)'; | 326 return '(Identical $left $right)'; |
| 327 } | 327 } |
| 328 | 328 |
| 329 String visitInterceptor(Interceptor node) { | 329 String visitInterceptor(Interceptor node) { |
| 330 return '(Interceptor ${access(node.input)})'; | 330 return '(Interceptor ${access(node.input)})'; |
| 331 } | 331 } |
| 332 |
| 333 String visitReifyRuntimeType(ReifyRuntimeType node) { |
| 334 return '(ReifyRuntimeType ${access(node.value)})'; |
| 335 } |
| 336 |
| 337 String visitReadTypeVariable(ReadTypeVariable node) { |
| 338 return '(ReadTypeVariable ${access(node.target)}.${node.variable})'; |
| 339 } |
| 332 } | 340 } |
| 333 | 341 |
| 334 class ConstantStringifier extends ConstantValueVisitor<String, Null> { | 342 class ConstantStringifier extends ConstantValueVisitor<String, Null> { |
| 335 // Some of these methods are unimplemented because we haven't had a need | 343 // Some of these methods are unimplemented because we haven't had a need |
| 336 // to print such constants. When printing is implemented, the corresponding | 344 // to print such constants. When printing is implemented, the corresponding |
| 337 // parsing support should be added to SExpressionUnstringifier.parseConstant | 345 // parsing support should be added to SExpressionUnstringifier.parseConstant |
| 338 // in the dart2js tests (currently in the file | 346 // in the dart2js tests (currently in the file |
| 339 // tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart). | 347 // tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart). |
| 340 | 348 |
| 341 String _failWith(ConstantValue constant) { | 349 String _failWith(ConstantValue constant) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 void setReturnContinuation(Continuation node) { | 439 void setReturnContinuation(Continuation node) { |
| 432 assert(!_names.containsKey(node) || _names[node] == 'return'); | 440 assert(!_names.containsKey(node) || _names[node] == 'return'); |
| 433 _names[node] = 'return'; | 441 _names[node] = 'return'; |
| 434 } | 442 } |
| 435 | 443 |
| 436 String getName(Node node) { | 444 String getName(Node node) { |
| 437 assert(_names.containsKey(node)); | 445 assert(_names.containsKey(node)); |
| 438 return _names[node]; | 446 return _names[node]; |
| 439 } | 447 } |
| 440 } | 448 } |
| OLD | NEW |