| 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 js_tree_ir_builder; | 5 library js_tree_ir_builder; |
| 6 | 6 |
| 7 import '../../tree_ir/tree_ir_builder.dart' show Builder; | 7 import '../../tree_ir/tree_ir_builder.dart' show Builder; |
| 8 import 'glue.dart' show Glue; | 8 import 'glue.dart' show Glue; |
| 9 import '../../dart2jslib.dart' show Selector, InternalErrorFunction; | 9 import '../../dart2jslib.dart' show Selector, InternalErrorFunction; |
| 10 import '../../elements/elements.dart'; | 10 import '../../elements/elements.dart'; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 getInterceptor, | 49 getInterceptor, |
| 50 selector, | 50 selector, |
| 51 <Expression>[getVariableUse(node.input)]); | 51 <Expression>[getVariableUse(node.input)]); |
| 52 } | 52 } |
| 53 | 53 |
| 54 Expression visitGetField(cps_ir.GetField node) { | 54 Expression visitGetField(cps_ir.GetField node) { |
| 55 return new GetField(getVariableUse(node.object), node.field); | 55 return new GetField(getVariableUse(node.object), node.field); |
| 56 } | 56 } |
| 57 | 57 |
| 58 Statement visitSetField(cps_ir.SetField node) { | 58 Statement visitSetField(cps_ir.SetField node) { |
| 59 return new SetField(getVariableUse(node.object), | 59 SetField setField = |
| 60 node.field, | 60 new SetField(getVariableUse(node.object), |
| 61 getVariableUse(node.value), | 61 node.field, |
| 62 visit(node.body)); | 62 getVariableUse(node.value)); |
| 63 return new ExpressionStatement(setField, visit(node.body)); |
| 63 } | 64 } |
| 64 | 65 |
| 65 Expression visitCreateBox(cps_ir.CreateBox node) { | 66 Expression visitCreateBox(cps_ir.CreateBox node) { |
| 66 return new CreateBox(); | 67 return new CreateBox(); |
| 67 } | 68 } |
| 68 | 69 |
| 69 Expression visitCreateInstance(cps_ir.CreateInstance node) { | 70 Expression visitCreateInstance(cps_ir.CreateInstance node) { |
| 70 return new CreateInstance( | 71 return new CreateInstance( |
| 71 node.classElement, | 72 node.classElement, |
| 72 node.arguments.map(getVariableUse).toList(growable: false), | 73 node.arguments.map(getVariableUse).toList(growable: false), |
| 73 node.typeInformation.map(getVariableUse).toList(growable: false)); | 74 node.typeInformation.map(getVariableUse).toList(growable: false)); |
| 74 } | 75 } |
| 75 } | 76 } |
| OLD | NEW |