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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 Constant(this.value, {this.sourceInformation}); | 289 Constant(this.value, {this.sourceInformation}); |
290 | 290 |
291 Constant.bool(values.BoolConstantValue constantValue) | 291 Constant.bool(values.BoolConstantValue constantValue) |
292 : value = constantValue, | 292 : value = constantValue, |
293 sourceInformation = null; | 293 sourceInformation = null; |
294 | 294 |
295 accept(ExpressionVisitor visitor) => visitor.visitConstant(this); | 295 accept(ExpressionVisitor visitor) => visitor.visitConstant(this); |
296 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitConstant(this, arg); | 296 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitConstant(this, arg); |
297 | 297 |
298 String toString() => 'Constant(value=${value.toStructuredString()})'; | 298 String toString() => 'Constant(value=${value.toStructuredText()})'; |
299 } | 299 } |
300 | 300 |
301 class This extends Expression { | 301 class This extends Expression { |
302 accept(ExpressionVisitor visitor) => visitor.visitThis(this); | 302 accept(ExpressionVisitor visitor) => visitor.visitThis(this); |
303 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg); | 303 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg); |
304 } | 304 } |
305 | 305 |
306 class LiteralList extends Expression { | 306 class LiteralList extends Expression { |
307 final InterfaceType type; | 307 final InterfaceType type; |
308 final List<Expression> values; | 308 final List<Expression> values; |
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 | 1598 |
1599 /// Number of uses of the current fallthrough target. | 1599 /// Number of uses of the current fallthrough target. |
1600 int get useCount => _stack.last.useCount; | 1600 int get useCount => _stack.last.useCount; |
1601 | 1601 |
1602 /// Indicate that a statement will fall through to the current fallthrough | 1602 /// Indicate that a statement will fall through to the current fallthrough |
1603 /// target. | 1603 /// target. |
1604 void use() { | 1604 void use() { |
1605 ++_stack.last.useCount; | 1605 ++_stack.last.useCount; |
1606 } | 1606 } |
1607 } | 1607 } |
OLD | NEW |