| Index: pkg/compiler/lib/src/compile_time_constants.dart
|
| diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
|
| index b9cbb559d3162f0369de53c13c960cf8dcf74ec5..c4fe1935079f57fc1f50e08a69657306fa9c17aa 100644
|
| --- a/pkg/compiler/lib/src/compile_time_constants.dart
|
| +++ b/pkg/compiler/lib/src/compile_time_constants.dart
|
| @@ -193,7 +193,7 @@ abstract class ConstantCompilerBase implements ConstantCompiler {
|
| AstElement currentElement = element.analyzableElement;
|
| return reporter.withCurrentElement(currentElement, () {
|
| // TODO(johnniwinther): Avoid this eager analysis.
|
| - _analyzeElementEagerly(compiler, currentElement);
|
| + compiler.resolution.ensureResolved(currentElement.declaration);
|
|
|
| ConstantExpression constant = compileVariableWithDefinitions(
|
| element, currentElement.resolvedAst.elements,
|
| @@ -847,7 +847,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
|
| // TODO(ahe): This is nasty: we must eagerly analyze the
|
| // constructor to ensure the redirectionTarget has been computed
|
| // correctly. Find a way to avoid this.
|
| - _analyzeElementEagerly(compiler, constructor);
|
| + resolution.ensureResolved(constructor.declaration);
|
|
|
| // The redirection chain of this element may not have been resolved through
|
| // a post-process action, so we have to make sure it is done here.
|
| @@ -1104,7 +1104,8 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
|
| : this.constructor = constructor,
|
| this.definitions = new Map<Element, AstConstant>(),
|
| this.fieldValues = new Map<Element, AstConstant>(),
|
| - this.resolvedAst = _analyzeElementEagerly(compiler, constructor),
|
| + this.resolvedAst =
|
| + compiler.resolution.computeResolvedAst(constructor.declaration),
|
| super(handler, null, compiler, isConst: true) {
|
| assert(invariant(constructor, constructor.isImplementation));
|
| }
|
| @@ -1336,12 +1337,6 @@ class ErroneousAstConstant extends AstConstant {
|
| new NullConstantValue());
|
| }
|
|
|
| -// TODO(johnniwinther): Clean this up.
|
| -ResolvedAst _analyzeElementEagerly(Compiler compiler, AstElement element) {
|
| - compiler.resolution.computeWorldImpact(element.declaration);
|
| - return element.resolvedAst;
|
| -}
|
| -
|
| class _CompilerEnvironment implements Environment {
|
| final Compiler compiler;
|
|
|
|
|