| 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 backend_ast_emitter; | 5 library backend_ast_emitter; |
| 6 | 6 |
| 7 import '../tree_ir/tree_ir_nodes.dart' as tree; | 7 import '../tree_ir/tree_ir_nodes.dart' as tree; |
| 8 import 'backend_ast_nodes.dart'; | 8 import 'backend_ast_nodes.dart'; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 ..element = exp.element; | 1252 ..element = exp.element; |
| 1253 } | 1253 } |
| 1254 | 1254 |
| 1255 @override | 1255 @override |
| 1256 Expression visitBinary(BinaryConstantExpression exp, | 1256 Expression visitBinary(BinaryConstantExpression exp, |
| 1257 BuilderContext<Statement> context) { | 1257 BuilderContext<Statement> context) { |
| 1258 return handlePrimitiveConstant(exp.value); | 1258 return handlePrimitiveConstant(exp.value); |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 @override | 1261 @override |
| 1262 Expression visitIdentical(IdenticalConstantExpression exp, |
| 1263 BuilderContext<Statement> context) { |
| 1264 return handlePrimitiveConstant(exp.value); |
| 1265 } |
| 1266 |
| 1267 @override |
| 1262 Expression visitConditional(ConditionalConstantExpression exp, | 1268 Expression visitConditional(ConditionalConstantExpression exp, |
| 1263 BuilderContext<Statement> context) { | 1269 BuilderContext<Statement> context) { |
| 1264 if (exp.condition.value.isTrue) { | 1270 if (exp.condition.value.isTrue) { |
| 1265 return exp.trueExp.accept(this); | 1271 return exp.trueExp.accept(this); |
| 1266 } else { | 1272 } else { |
| 1267 return exp.falseExp.accept(this); | 1273 return exp.falseExp.accept(this); |
| 1268 } | 1274 } |
| 1269 } | 1275 } |
| 1270 | 1276 |
| 1271 @override | 1277 @override |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); | 1359 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); |
| 1354 | 1360 |
| 1355 ExecutableElement get executableContext => enclosingElement; | 1361 ExecutableElement get executableContext => enclosingElement; |
| 1356 | 1362 |
| 1357 ExecutableElement get memberContext => executableContext.memberContext; | 1363 ExecutableElement get memberContext => executableContext.memberContext; |
| 1358 | 1364 |
| 1359 bool get isLocal => true; | 1365 bool get isLocal => true; |
| 1360 | 1366 |
| 1361 LibraryElement get implementationLibrary => enclosingElement.library; | 1367 LibraryElement get implementationLibrary => enclosingElement.library; |
| 1362 } | 1368 } |
| OLD | NEW |