| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 String visitGetField(GetField node) { | 251 String visitGetField(GetField node) { |
| 252 String object = access(node.object); | 252 String object = access(node.object); |
| 253 String field = node.field.toString(); | 253 String field = node.field.toString(); |
| 254 return '(GetField $object $field)'; | 254 return '(GetField $object $field)'; |
| 255 } | 255 } |
| 256 | 256 |
| 257 String visitCreateBox(CreateBox node) { | 257 String visitCreateBox(CreateBox node) { |
| 258 return '(CreateBox)'; | 258 return '(CreateBox)'; |
| 259 } | 259 } |
| 260 | 260 |
| 261 String visitCreateClosureClass(CreateClosureClass node) { | 261 String visitCreateInstance(CreateInstance node) { |
| 262 String className = node.classElement.name; | 262 String className = node.classElement.name; |
| 263 String arguments = node.arguments.map(access).join(' '); | 263 String arguments = node.arguments.map(access).join(' '); |
| 264 return '(CreateClosureClass $className ($arguments))'; | 264 return '(CreateInstance $className ($arguments))'; |
| 265 } | 265 } |
| 266 | 266 |
| 267 String visitIdentical(Identical node) { | 267 String visitIdentical(Identical node) { |
| 268 String left = access(node.left); | 268 String left = access(node.left); |
| 269 String right = access(node.right); | 269 String right = access(node.right); |
| 270 return '(Identical $left $right)'; | 270 return '(Identical $left $right)'; |
| 271 } | 271 } |
| 272 | 272 |
| 273 String visitInterceptor(Interceptor node) { | 273 String visitInterceptor(Interceptor node) { |
| 274 return '(Interceptor ${node.input})'; | 274 return '(Interceptor ${node.input})'; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 void setReturnContinuation(Continuation node) { | 367 void setReturnContinuation(Continuation node) { |
| 368 assert(!_names.containsKey(node) || _names[node] == 'return'); | 368 assert(!_names.containsKey(node) || _names[node] == 'return'); |
| 369 _names[node] = 'return'; | 369 _names[node] = 'return'; |
| 370 } | 370 } |
| 371 | 371 |
| 372 String getName(Node node) { | 372 String getName(Node node) { |
| 373 assert(_names.containsKey(node)); | 373 assert(_names.containsKey(node)); |
| 374 return _names[node]; | 374 return _names[node]; |
| 375 } | 375 } |
| 376 } | 376 } |
| OLD | NEW |