| 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/expressions.dart'; | 7 import '../constants/expressions.dart'; |
| 8 import '../constants/values.dart' as values; | 8 import '../constants/values.dart' as values; |
| 9 import '../dart_types.dart' show DartType, GenericType, InterfaceType, TypeVaria
bleType; | 9 import '../dart_types.dart' show DartType, GenericType, InterfaceType, TypeVaria
bleType; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 266 } |
| 267 | 267 |
| 268 /** | 268 /** |
| 269 * A constant. | 269 * A constant. |
| 270 */ | 270 */ |
| 271 class Constant extends Expression { | 271 class Constant extends Expression { |
| 272 final ConstantExpression expression; | 272 final ConstantExpression expression; |
| 273 | 273 |
| 274 Constant(this.expression); | 274 Constant(this.expression); |
| 275 | 275 |
| 276 Constant.primitive(values.PrimitiveConstantValue primitiveValue) | 276 Constant.bool(values.BoolConstantValue constantValue) |
| 277 : expression = new PrimitiveConstantExpression(primitiveValue); | 277 : expression = new BoolConstantExpression( |
| 278 constantValue.primitiveValue, constantValue); |
| 278 | 279 |
| 279 accept(ExpressionVisitor visitor) => visitor.visitConstant(this); | 280 accept(ExpressionVisitor visitor) => visitor.visitConstant(this); |
| 280 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitConstant(this, arg); | 281 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitConstant(this, arg); |
| 281 | 282 |
| 282 values.ConstantValue get value => expression.value; | 283 values.ConstantValue get value => expression.value; |
| 283 } | 284 } |
| 284 | 285 |
| 285 class This extends Expression { | 286 class This extends Expression { |
| 286 accept(ExpressionVisitor visitor) => visitor.visitThis(this); | 287 accept(ExpressionVisitor visitor) => visitor.visitThis(this); |
| 287 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg); | 288 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg); |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 visitReadTypeVariable(ReadTypeVariable node) { | 1389 visitReadTypeVariable(ReadTypeVariable node) { |
| 1389 node.target = visitExpression(node.target); | 1390 node.target = visitExpression(node.target); |
| 1390 return node; | 1391 return node; |
| 1391 } | 1392 } |
| 1392 | 1393 |
| 1393 visitTypeExpression(TypeExpression node) { | 1394 visitTypeExpression(TypeExpression node) { |
| 1394 _replaceExpressions(node.arguments); | 1395 _replaceExpressions(node.arguments); |
| 1395 return node; | 1396 return node; |
| 1396 } | 1397 } |
| 1397 } | 1398 } |
| OLD | NEW |