| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } | 394 } |
| 395 | 395 |
| 396 accept(Visitor visitor) => visitor.visitInvokeConstructor(this); | 396 accept(Visitor visitor) => visitor.visitInvokeConstructor(this); |
| 397 } | 397 } |
| 398 | 398 |
| 399 /// "as" casts and "is" checks. | 399 /// "as" casts and "is" checks. |
| 400 // We might want to turn "is"-checks into a [Primitive] as it can never diverge. | 400 // We might want to turn "is"-checks into a [Primitive] as it can never diverge. |
| 401 // But then we need to special-case for is-checks with an erroneous .type as | 401 // But then we need to special-case for is-checks with an erroneous .type as |
| 402 // these will throw. | 402 // these will throw. |
| 403 class TypeOperator extends Expression { | 403 class TypeOperator extends Expression { |
| 404 final Reference<Primitive> receiver; | 404 Reference<Primitive> receiver; |
| 405 final DartType type; | 405 final DartType type; |
| 406 final Reference<Continuation> continuation; | 406 final Reference<Continuation> continuation; |
| 407 // TODO(johnniwinther): Use `Operator` class to encapsule the operator type. | 407 // TODO(johnniwinther): Use `Operator` class to encapsule the operator type. |
| 408 final bool isTypeTest; | 408 final bool isTypeTest; |
| 409 | 409 |
| 410 TypeOperator(Primitive receiver, | 410 TypeOperator(Primitive receiver, |
| 411 this.type, | 411 this.type, |
| 412 Continuation cont, | 412 Continuation cont, |
| 413 {bool this.isTypeTest}) | 413 {bool this.isTypeTest}) |
| 414 : this.receiver = new Reference<Primitive>(receiver), | 414 : this.receiver = new Reference<Primitive>(receiver), |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 processNonTailThrow(node); | 1407 processNonTailThrow(node); |
| 1408 processReference(node.value); | 1408 processReference(node.value); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 processCreateInvocationMirror(CreateInvocationMirror node) {} | 1411 processCreateInvocationMirror(CreateInvocationMirror node) {} |
| 1412 visitCreateInvocationMirror(CreateInvocationMirror node) { | 1412 visitCreateInvocationMirror(CreateInvocationMirror node) { |
| 1413 processCreateInvocationMirror(node); | 1413 processCreateInvocationMirror(node); |
| 1414 node.arguments.forEach(processReference); | 1414 node.arguments.forEach(processReference); |
| 1415 } | 1415 } |
| 1416 } | 1416 } |
| OLD | NEW |