| 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 '../util/util.dart'; | 7 import '../util/util.dart'; |
| 8 import 'cps_ir_nodes.dart'; | 8 import 'cps_ir_nodes.dart'; |
| 9 | 9 |
| 10 /// A [Decorator] is a function used by [SExpressionStringifier] to augment the | 10 /// A [Decorator] is a function used by [SExpressionStringifier] to augment the |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 String visitIsTrue(IsTrue node) { | 222 String visitIsTrue(IsTrue node) { |
| 223 String value = access(node.value); | 223 String value = access(node.value); |
| 224 return '(IsTrue $value)'; | 224 return '(IsTrue $value)'; |
| 225 } | 225 } |
| 226 | 226 |
| 227 String visitIdentical(Identical node) { | 227 String visitIdentical(Identical node) { |
| 228 String left = access(node.left); | 228 String left = access(node.left); |
| 229 String right = access(node.right); | 229 String right = access(node.right); |
| 230 return '(Identical $left $right)'; | 230 return '(Identical $left $right)'; |
| 231 } | 231 } |
| 232 |
| 233 String visitInterceptor(Interceptor node) { |
| 234 return '(Interceptor ${node.input})'; |
| 235 } |
| 232 } | 236 } |
| 233 | 237 |
| 234 class _Namer { | 238 class _Namer { |
| 235 final Map<Node, String> _names = <Node, String>{}; | 239 final Map<Node, String> _names = <Node, String>{}; |
| 236 int _valueCounter = 0; | 240 int _valueCounter = 0; |
| 237 int _continuationCounter = 0; | 241 int _continuationCounter = 0; |
| 238 | 242 |
| 239 String useElementName(Parameter parameter) { | 243 String useElementName(Parameter parameter) { |
| 240 assert(!_names.containsKey(parameter)); | 244 assert(!_names.containsKey(parameter)); |
| 241 return _names[parameter] = parameter.hint.name; | 245 return _names[parameter] = parameter.hint.name; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 259 String useReturnName(Continuation node) { | 263 String useReturnName(Continuation node) { |
| 260 assert(!_names.containsKey(node) || _names[node] == 'return'); | 264 assert(!_names.containsKey(node) || _names[node] == 'return'); |
| 261 return _names[node] = 'return'; | 265 return _names[node] = 'return'; |
| 262 } | 266 } |
| 263 | 267 |
| 264 String getName(Node node) { | 268 String getName(Node node) { |
| 265 assert(_names.containsKey(node)); | 269 assert(_names.containsKey(node)); |
| 266 return _names[node]; | 270 return _names[node]; |
| 267 } | 271 } |
| 268 } | 272 } |
| OLD | NEW |