| 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_tracer; | 5 library dart2js.ir_tracer; |
| 6 | 6 |
| 7 import 'dart:async' show EventSink; | 7 import 'dart:async' show EventSink; |
| 8 import 'cps_ir_nodes.dart' as cps_ir; | 8 import 'cps_ir_nodes.dart' as cps_ir; |
| 9 import '../tracer.dart'; | 9 import '../tracer.dart'; |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 return "GetLazyStatic $element"; | 286 return "GetLazyStatic $element"; |
| 287 } | 287 } |
| 288 | 288 |
| 289 visitCreateBox(cps_ir.CreateBox node) { | 289 visitCreateBox(cps_ir.CreateBox node) { |
| 290 return 'CreateBox'; | 290 return 'CreateBox'; |
| 291 } | 291 } |
| 292 | 292 |
| 293 visitCreateInstance(cps_ir.CreateInstance node) { | 293 visitCreateInstance(cps_ir.CreateInstance node) { |
| 294 String className = node.classElement.name; | 294 String className = node.classElement.name; |
| 295 String arguments = node.arguments.map(formatReference).join(', '); | 295 String arguments = node.arguments.map(formatReference).join(', '); |
| 296 String typeInformation = | 296 String typeInformation = formatReference(node.typeInformation); |
| 297 node.typeInformation.map(formatReference).join(', '); | |
| 298 return 'CreateInstance $className ($arguments) <$typeInformation>'; | 297 return 'CreateInstance $className ($arguments) <$typeInformation>'; |
| 299 } | 298 } |
| 300 | 299 |
| 301 visitInterceptor(cps_ir.Interceptor node) { | 300 visitInterceptor(cps_ir.Interceptor node) { |
| 302 return 'Interceptor(${formatReference(node.input)}, ' | 301 return 'Interceptor(${formatReference(node.input)}, ' |
| 303 '${node.interceptedClasses})'; | 302 '${node.interceptedClasses})'; |
| 304 } | 303 } |
| 305 | 304 |
| 306 visitGetMutable(cps_ir.GetMutable node) { | 305 visitGetMutable(cps_ir.GetMutable node) { |
| 307 String variable = names.name(node.variable.definition); | 306 String variable = names.name(node.variable.definition); |
| 308 return 'GetMutable $variable'; | 307 return 'GetMutable $variable'; |
| 309 } | 308 } |
| 310 | 309 |
| 311 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { | 310 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { |
| 312 return "ReadTypeVariable ${node.variable.element} " | 311 return "ReadTypeVariable ${node.variable.element} " |
| 313 "${formatReference(node.target)}"; | 312 "${formatReference(node.target)}"; |
| 314 } | 313 } |
| 315 | 314 |
| 316 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { | 315 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { |
| 317 return "ReifyRuntimeType ${formatReference(node.value)}"; | 316 return "ReifyRuntimeType ${formatReference(node.value)}"; |
| 318 } | 317 } |
| 319 | 318 |
| 320 visitTypeExpression(cps_ir.TypeExpression node) { | 319 visitTypeExpression(cps_ir.TypeExpression node) { |
| 321 return "TypeExpression ${node.dartType} " | 320 return "TypeExpression ${node.kindAsString} ${node.dartType}" |
| 322 "${node.arguments.map(formatReference).join(', ')}"; | 321 "${node.arguments.map(formatReference).join(', ')}"; |
| 323 } | 322 } |
| 324 | 323 |
| 325 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { | 324 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { |
| 326 String args = node.arguments.map(formatReference).join(', '); | 325 String args = node.arguments.map(formatReference).join(', '); |
| 327 return "CreateInvocationMirror(${node.selector.name}, $args)"; | 326 return "CreateInvocationMirror(${node.selector.name}, $args)"; |
| 328 } | 327 } |
| 329 | 328 |
| 330 visitTypeTest(cps_ir.TypeTest node) { | 329 visitTypeTest(cps_ir.TypeTest node) { |
| 331 String value = formatReference(node.value); | 330 String value = formatReference(node.value); |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 } | 676 } |
| 678 | 677 |
| 679 visitBoundsCheck(cps_ir.BoundsCheck node) { | 678 visitBoundsCheck(cps_ir.BoundsCheck node) { |
| 680 unexpectedNode(node); | 679 unexpectedNode(node); |
| 681 } | 680 } |
| 682 | 681 |
| 683 visitNullCheck(cps_ir.NullCheck node) { | 682 visitNullCheck(cps_ir.NullCheck node) { |
| 684 unexpectedNode(node); | 683 unexpectedNode(node); |
| 685 } | 684 } |
| 686 } | 685 } |
| OLD | NEW |