OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 ssa.tracer; | 5 library ssa.tracer; |
6 | 6 |
7 import 'dart:async' show EventSink; | 7 import 'dart:async' show EventSink; |
8 | 8 |
9 import 'ssa.dart'; | 9 import 'ssa.dart'; |
10 import '../js_backend/js_backend.dart'; | 10 import '../js_backend/js_backend.dart'; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 String visitInvokeClosure(HInvokeClosure node) | 299 String visitInvokeClosure(HInvokeClosure node) |
300 => visitInvokeDynamic(node, "closure"); | 300 => visitInvokeDynamic(node, "closure"); |
301 | 301 |
302 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) { | 302 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) { |
303 String receiver = temporaryId(invoke.receiver); | 303 String receiver = temporaryId(invoke.receiver); |
304 String name = invoke.selector.name; | 304 String name = invoke.selector.name; |
305 String target = "($kind) $receiver.$name"; | 305 String target = "($kind) $receiver.$name"; |
306 int offset = HInvoke.ARGUMENTS_OFFSET; | 306 int offset = HInvoke.ARGUMENTS_OFFSET; |
307 List arguments = invoke.inputs.sublist(offset); | 307 List arguments = invoke.inputs.sublist(offset); |
308 return visitGenericInvoke("Invoke", target, arguments) + | 308 return visitGenericInvoke("Invoke", target, arguments) + |
309 "(${invoke.mask})"; | 309 "(${invoke.selector.mask})"; |
310 } | 310 } |
311 | 311 |
312 String visitInvokeDynamicMethod(HInvokeDynamicMethod node) | 312 String visitInvokeDynamicMethod(HInvokeDynamicMethod node) |
313 => visitInvokeDynamic(node, "method"); | 313 => visitInvokeDynamic(node, "method"); |
314 String visitInvokeDynamicGetter(HInvokeDynamicGetter node) | 314 String visitInvokeDynamicGetter(HInvokeDynamicGetter node) |
315 => visitInvokeDynamic(node, "get"); | 315 => visitInvokeDynamic(node, "get"); |
316 String visitInvokeDynamicSetter(HInvokeDynamicSetter node) | 316 String visitInvokeDynamicSetter(HInvokeDynamicSetter node) |
317 => visitInvokeDynamic(node, "set"); | 317 => visitInvokeDynamic(node, "set"); |
318 | 318 |
319 String visitInvokeStatic(HInvokeStatic invoke) { | 319 String visitInvokeStatic(HInvokeStatic invoke) { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 } | 523 } |
524 | 524 |
525 String visitAwait(HAwait node) { | 525 String visitAwait(HAwait node) { |
526 return "await ${temporaryId(node.inputs[0])}"; | 526 return "await ${temporaryId(node.inputs[0])}"; |
527 } | 527 } |
528 | 528 |
529 String visitYield(HYield node) { | 529 String visitYield(HYield node) { |
530 return "yield${node.hasStar ? "*" : ""} ${temporaryId(node.inputs[0])}"; | 530 return "yield${node.hasStar ? "*" : ""} ${temporaryId(node.inputs[0])}"; |
531 } | 531 } |
532 } | 532 } |
OLD | NEW |