| 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 tree_ir_builder; | 5 library tree_ir_builder; |
| 6 | 6 |
| 7 import '../dart2jslib.dart' as dart2js; | 7 import '../dart2jslib.dart' as dart2js; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; | 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; |
| 10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; | 10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 } else { | 605 } else { |
| 606 assert(node.continuation == null); | 606 assert(node.continuation == null); |
| 607 return new ForeignStatement( | 607 return new ForeignStatement( |
| 608 node.codeTemplate, | 608 node.codeTemplate, |
| 609 node.type, | 609 node.type, |
| 610 node.arguments.map(getVariableUse).toList(growable: false), | 610 node.arguments.map(getVariableUse).toList(growable: false), |
| 611 node.nativeBehavior, | 611 node.nativeBehavior, |
| 612 node.dependency); | 612 node.dependency); |
| 613 } | 613 } |
| 614 } | 614 } |
| 615 |
| 616 Expression visitGetLength(cps_ir.GetLength node) { |
| 617 return new GetLength(getVariableUse(node.object)); |
| 618 } |
| 619 |
| 620 Expression visitGetIndex(cps_ir.GetIndex node) { |
| 621 return new GetIndex(getVariableUse(node.object), |
| 622 getVariableUse(node.index)); |
| 623 } |
| 624 |
| 625 Expression visitSetIndex(cps_ir.SetIndex node) { |
| 626 return new SetIndex(getVariableUse(node.object), |
| 627 getVariableUse(node.index), |
| 628 getVariableUse(node.value)); |
| 629 } |
| 615 } | 630 } |
| 616 | 631 |
| OLD | NEW |