| 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_nodes; | 5 library tree_ir_nodes; |
| 6 | 6 |
| 7 import '../constants/values.dart' as values; | 7 import '../constants/values.dart' as values; |
| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 class InvokeMethodDirectly extends Expression implements Invoke { | 229 class InvokeMethodDirectly extends Expression implements Invoke { |
| 230 Expression receiver; | 230 Expression receiver; |
| 231 final Element target; | 231 final Element target; |
| 232 final Selector selector; | 232 final Selector selector; |
| 233 final List<Expression> arguments; | 233 final List<Expression> arguments; |
| 234 final SourceInformation sourceInformation; | 234 final SourceInformation sourceInformation; |
| 235 | 235 |
| 236 InvokeMethodDirectly(this.receiver, this.target, this.selector, | 236 InvokeMethodDirectly(this.receiver, this.target, this.selector, |
| 237 this.arguments, this.sourceInformation); | 237 this.arguments, this.sourceInformation); |
| 238 | 238 |
| 239 bool get isTearOff => selector.isGetter && !target.isGetter; |
| 240 |
| 239 accept(ExpressionVisitor visitor) => visitor.visitInvokeMethodDirectly(this); | 241 accept(ExpressionVisitor visitor) => visitor.visitInvokeMethodDirectly(this); |
| 240 accept1(ExpressionVisitor1 visitor, arg) { | 242 accept1(ExpressionVisitor1 visitor, arg) { |
| 241 return visitor.visitInvokeMethodDirectly(this, arg); | 243 return visitor.visitInvokeMethodDirectly(this, arg); |
| 242 } | 244 } |
| 243 } | 245 } |
| 244 | 246 |
| 245 /** | 247 /** |
| 246 * Call to a factory or generative constructor. | 248 * Call to a factory or generative constructor. |
| 247 */ | 249 */ |
| 248 class InvokeConstructor extends Expression implements Invoke { | 250 class InvokeConstructor extends Expression implements Invoke { |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1596 | 1598 |
| 1597 /// Number of uses of the current fallthrough target. | 1599 /// Number of uses of the current fallthrough target. |
| 1598 int get useCount => _stack.last.useCount; | 1600 int get useCount => _stack.last.useCount; |
| 1599 | 1601 |
| 1600 /// Indicate that a statement will fall through to the current fallthrough | 1602 /// Indicate that a statement will fall through to the current fallthrough |
| 1601 /// target. | 1603 /// target. |
| 1602 void use() { | 1604 void use() { |
| 1603 ++_stack.last.useCount; | 1605 ++_stack.last.useCount; |
| 1604 } | 1606 } |
| 1605 } | 1607 } |
| OLD | NEW |