| 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 | 4 |
| 5 // IrNodes are kept in a separate library to have precise control over their | 5 // IrNodes are kept in a separate library to have precise control over their |
| 6 // dependencies on other parts of the system. | 6 // dependencies on other parts of the system. |
| 7 library dart2js.ir_nodes; | 7 library dart2js.ir_nodes; |
| 8 | 8 |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../constants/values.dart' as values show ConstantValue; | 10 import '../constants/values.dart' as values show ConstantValue; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 /// with a different implementation, the overriding implementation is bypassed | 320 /// with a different implementation, the overriding implementation is bypassed |
| 321 /// and [target]'s implementation is invoked. | 321 /// and [target]'s implementation is invoked. |
| 322 /// | 322 /// |
| 323 /// As with [InvokeMethod], this can be used to invoke a method, operator, | 323 /// As with [InvokeMethod], this can be used to invoke a method, operator, |
| 324 /// getter, setter, or index getter/setter. | 324 /// getter, setter, or index getter/setter. |
| 325 /// | 325 /// |
| 326 /// If it is known that [target] does not use its receiver argument, then | 326 /// If it is known that [target] does not use its receiver argument, then |
| 327 /// [receiver] may refer to a null constant primitive. This happens for direct | 327 /// [receiver] may refer to a null constant primitive. This happens for direct |
| 328 /// invocations to intercepted methods, where the effective receiver is instead | 328 /// invocations to intercepted methods, where the effective receiver is instead |
| 329 /// passed as a formal parameter. | 329 /// passed as a formal parameter. |
| 330 /// TODO(sra): Review. A direct call to a method that is mixed into a native |
| 331 /// class will still require an explicit argument. |
| 330 /// | 332 /// |
| 331 /// When targeting Dart, this instruction is used to represent super calls. | 333 /// When targeting Dart, this instruction is used to represent super calls. |
| 332 /// Here, [receiver] must always be a reference to `this`, and [target] must be | 334 /// Here, [receiver] must always be a reference to `this`, and [target] must be |
| 333 /// a method that is available in the super class. | 335 /// a method that is available in the super class. |
| 334 class InvokeMethodDirectly extends Expression implements Invoke { | 336 class InvokeMethodDirectly extends Expression implements Invoke { |
| 335 Reference<Primitive> receiver; | 337 Reference<Primitive> receiver; |
| 336 final Element target; | 338 final Element target; |
| 337 final Selector selector; | 339 final Selector selector; |
| 338 final Reference<Continuation> continuation; | 340 final Reference<Continuation> continuation; |
| 339 final List<Reference<Primitive>> arguments; | 341 final List<Reference<Primitive>> arguments; |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 } | 1496 } |
| 1495 | 1497 |
| 1496 void visitReifyRuntimeType(ReifyRuntimeType node) { | 1498 void visitReifyRuntimeType(ReifyRuntimeType node) { |
| 1497 visitReference(node.value); | 1499 visitReference(node.value); |
| 1498 } | 1500 } |
| 1499 | 1501 |
| 1500 void visitReadTypeVariable(ReadTypeVariable node) { | 1502 void visitReadTypeVariable(ReadTypeVariable node) { |
| 1501 visitReference(node.target); | 1503 visitReference(node.target); |
| 1502 } | 1504 } |
| 1503 } | 1505 } |
| OLD | NEW |