| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 String visitInvokeMethod(InvokeMethod node) { | 126 String visitInvokeMethod(InvokeMethod node) { |
| 127 String name = node.selector.name; | 127 String name = node.selector.name; |
| 128 String rcv = access(node.receiver); | 128 String rcv = access(node.receiver); |
| 129 String cont = access(node.continuation); | 129 String cont = access(node.continuation); |
| 130 String args = formatArguments(node); | 130 String args = formatArguments(node); |
| 131 return '$indentation(InvokeMethod $rcv $name $args $cont)'; | 131 return '$indentation(InvokeMethod $rcv $name $args $cont)'; |
| 132 } | 132 } |
| 133 | 133 |
| 134 String visitInvokeSuperMethod(InvokeSuperMethod node) { | 134 String visitInvokeMethodDirectly(InvokeMethodDirectly node) { |
| 135 String receiver = access(node.receiver); |
| 135 String name = node.selector.name; | 136 String name = node.selector.name; |
| 136 String cont = access(node.continuation); | 137 String cont = access(node.continuation); |
| 137 String args = formatArguments(node); | 138 String args = formatArguments(node); |
| 138 return '$indentation(InvokeSuperMethod $name $args $cont)'; | 139 return '$indentation(InvokeMethodDirectly $receiver $name $args $cont)'; |
| 139 } | 140 } |
| 140 | 141 |
| 141 String visitInvokeConstructor(InvokeConstructor node) { | 142 String visitInvokeConstructor(InvokeConstructor node) { |
| 142 String callName; | 143 String callName; |
| 143 if (node.target.name.isEmpty) { | 144 if (node.target.name.isEmpty) { |
| 144 callName = '${node.type}'; | 145 callName = '${node.type}'; |
| 145 } else { | 146 } else { |
| 146 callName = '${node.type}.${node.target.name}'; | 147 callName = '${node.type}.${node.target.name}'; |
| 147 } | 148 } |
| 148 String cont = access(node.continuation); | 149 String cont = access(node.continuation); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 void setReturnContinuation(Continuation node) { | 367 void setReturnContinuation(Continuation node) { |
| 367 assert(!_names.containsKey(node) || _names[node] == 'return'); | 368 assert(!_names.containsKey(node) || _names[node] == 'return'); |
| 368 _names[node] = 'return'; | 369 _names[node] = 'return'; |
| 369 } | 370 } |
| 370 | 371 |
| 371 String getName(Node node) { | 372 String getName(Node node) { |
| 372 assert(_names.containsKey(node)); | 373 assert(_names.containsKey(node)); |
| 373 return _names[node]; | 374 return _names[node]; |
| 374 } | 375 } |
| 375 } | 376 } |
| OLD | NEW |