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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 return '(GetStatic $element)'; | 340 return '(GetStatic $element)'; |
341 } | 341 } |
342 | 342 |
343 String visitSetStatic(SetStatic node) { | 343 String visitSetStatic(SetStatic node) { |
344 String element = node.element.name; | 344 String element = node.element.name; |
345 String value = access(node.value); | 345 String value = access(node.value); |
346 String body = indentBlock(() => visit(node.body)); | 346 String body = indentBlock(() => visit(node.body)); |
347 return '$indentation(SetStatic $element $value\n$body)'; | 347 return '$indentation(SetStatic $element $value\n$body)'; |
348 } | 348 } |
349 | 349 |
| 350 String visitGetLazyStatic(GetLazyStatic node) { |
| 351 String element = node.element.name; |
| 352 String cont = access(node.continuation); |
| 353 return '$indentation(GetLazyStatic $element $cont)'; |
| 354 } |
| 355 |
350 String visitCreateBox(CreateBox node) { | 356 String visitCreateBox(CreateBox node) { |
351 return '(CreateBox)'; | 357 return '(CreateBox)'; |
352 } | 358 } |
353 | 359 |
354 String visitCreateInstance(CreateInstance node) { | 360 String visitCreateInstance(CreateInstance node) { |
355 String className = node.classElement.name; | 361 String className = node.classElement.name; |
356 String arguments = node.arguments.map(access).join(' '); | 362 String arguments = node.arguments.map(access).join(' '); |
357 String typeInformation = node.typeInformation.map(access).join(' '); | 363 String typeInformation = node.typeInformation.map(access).join(' '); |
358 return '(CreateInstance $className ($arguments)$typeInformation)'; | 364 return '(CreateInstance $className ($arguments)$typeInformation)'; |
359 } | 365 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 void setReturnContinuation(Continuation node) { | 504 void setReturnContinuation(Continuation node) { |
499 assert(!_names.containsKey(node) || _names[node] == 'return'); | 505 assert(!_names.containsKey(node) || _names[node] == 'return'); |
500 _names[node] = 'return'; | 506 _names[node] = 'return'; |
501 } | 507 } |
502 | 508 |
503 String getName(Node node) { | 509 String getName(Node node) { |
504 if (!_names.containsKey(node)) return 'MISSING_NAME'; | 510 if (!_names.containsKey(node)) return 'MISSING_NAME'; |
505 return _names[node]; | 511 return _names[node]; |
506 } | 512 } |
507 } | 513 } |
OLD | NEW |