| 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 library dart2js.ir_nodes; | 4 library dart2js.ir_nodes; |
| 5 | 5 |
| 6 import '../constants/expressions.dart'; | 6 import '../constants/expressions.dart'; |
| 7 import '../constants/values.dart' as values show ConstantValue; | 7 import '../constants/values.dart' as values show ConstantValue; |
| 8 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; | 8 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../io/source_information.dart' show SourceInformation; | 10 import '../io/source_information.dart' show SourceInformation; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 LetMutable(this.variable, Primitive value) | 216 LetMutable(this.variable, Primitive value) |
| 217 : this.value = new Reference<Primitive>(value); | 217 : this.value = new Reference<Primitive>(value); |
| 218 | 218 |
| 219 Expression plug(Expression expr) { | 219 Expression plug(Expression expr) { |
| 220 return body = expr; | 220 return body = expr; |
| 221 } | 221 } |
| 222 | 222 |
| 223 accept(Visitor visitor) => visitor.visitLetMutable(this); | 223 accept(Visitor visitor) => visitor.visitLetMutable(this); |
| 224 } | 224 } |
| 225 | 225 |
| 226 abstract class Invoke { | 226 abstract class Invoke implements Expression { |
| 227 Selector get selector; | 227 Selector get selector; |
| 228 List<Reference<Primitive>> get arguments; | 228 List<Reference<Primitive>> get arguments; |
| 229 Reference<Continuation> get continuation; |
| 229 } | 230 } |
| 230 | 231 |
| 231 /// Represents a node with a child node, which can be accessed through the | 232 /// Represents a node with a child node, which can be accessed through the |
| 232 /// `body` member. A typical usage is when removing a node from the CPS graph: | 233 /// `body` member. A typical usage is when removing a node from the CPS graph: |
| 233 /// | 234 /// |
| 234 /// Node child = node.body; | 235 /// Node child = node.body; |
| 235 /// InteriorNode parent = node.parent; | 236 /// InteriorNode parent = node.parent; |
| 236 /// | 237 /// |
| 237 /// child.parent = parent; | 238 /// child.parent = parent; |
| 238 /// parent.body = child; | 239 /// parent.body = child; |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 const RemovalVisitor(); | 1270 const RemovalVisitor(); |
| 1270 | 1271 |
| 1271 processReference(Reference reference) { | 1272 processReference(Reference reference) { |
| 1272 reference.unlink(); | 1273 reference.unlink(); |
| 1273 } | 1274 } |
| 1274 | 1275 |
| 1275 static void remove(Node node) { | 1276 static void remove(Node node) { |
| 1276 (const RemovalVisitor()).visit(node); | 1277 (const RemovalVisitor()).visit(node); |
| 1277 } | 1278 } |
| 1278 } | 1279 } |
| OLD | NEW |