| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 dart2js.compile_time_constant_evaluator; | 5 library dart2js.compile_time_constant_evaluator; |
| 6 | 6 |
| 7 import 'common.dart'; | 7 import 'common.dart'; |
| 8 import 'common/resolution.dart' show | 8 import 'common/resolution.dart' show |
| 9 Resolution; | 9 Resolution; |
| 10 import 'common/tasks.dart' show | 10 import 'common/tasks.dart' show |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 | 1253 |
| 1254 /// A synthetic constant used to recover from errors. | 1254 /// A synthetic constant used to recover from errors. |
| 1255 class ErroneousAstConstant extends AstConstant { | 1255 class ErroneousAstConstant extends AstConstant { |
| 1256 ErroneousAstConstant(Element element, Node node) : super(element, node, | 1256 ErroneousAstConstant(Element element, Node node) : super(element, node, |
| 1257 // TODO(johnniwinther): Return a [NonConstantValue] instead. | 1257 // TODO(johnniwinther): Return a [NonConstantValue] instead. |
| 1258 new ErroneousConstantExpression(), new NullConstantValue()); | 1258 new ErroneousConstantExpression(), new NullConstantValue()); |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 // TODO(johnniwinther): Clean this up. | 1261 // TODO(johnniwinther): Clean this up. |
| 1262 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) { | 1262 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) { |
| 1263 compiler.resolution.analyzeElement(element.declaration); | 1263 compiler.resolution.computeWorldImpact(element.declaration); |
| 1264 return element.resolvedAst.elements; | 1264 return element.resolvedAst.elements; |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 class _CompilerEnvironment implements Environment { | 1267 class _CompilerEnvironment implements Environment { |
| 1268 final Compiler compiler; | 1268 final Compiler compiler; |
| 1269 | 1269 |
| 1270 _CompilerEnvironment(this.compiler); | 1270 _CompilerEnvironment(this.compiler); |
| 1271 | 1271 |
| 1272 @override | 1272 @override |
| 1273 String readFromEnvironment(String name) { | 1273 String readFromEnvironment(String name) { |
| 1274 return compiler.fromEnvironment(name); | 1274 return compiler.fromEnvironment(name); |
| 1275 } | 1275 } |
| 1276 } | 1276 } |
| OLD | NEW |