| 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 825176c0fbf10e57c32de81c7d585ca782223919..b9cbb559d3162f0369de53c13c960cf8dcf74ec5 100644
|
| --- a/pkg/compiler/lib/src/compile_time_constants.dart
|
| +++ b/pkg/compiler/lib/src/compile_time_constants.dart
|
| @@ -1092,6 +1092,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
|
| final ConstructorElement constructor;
|
| final Map<Element, AstConstant> definitions;
|
| final Map<Element, AstConstant> fieldValues;
|
| + final ResolvedAst resolvedAst;
|
|
|
| /**
|
| * Documentation wanted -- johnniwinther
|
| @@ -1103,11 +1104,14 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
|
| : this.constructor = constructor,
|
| this.definitions = new Map<Element, AstConstant>(),
|
| this.fieldValues = new Map<Element, AstConstant>(),
|
| - super(handler, _analyzeElementEagerly(compiler, constructor), compiler,
|
| - isConst: true) {
|
| + this.resolvedAst = _analyzeElementEagerly(compiler, constructor),
|
| + super(handler, null, compiler, isConst: true) {
|
| assert(invariant(constructor, constructor.isImplementation));
|
| }
|
|
|
| + @override
|
| + TreeElements get elements => resolvedAst.elements;
|
| +
|
| AstConstant visitSend(Send send) {
|
| Element element = elements[send];
|
| if (Elements.isLocal(element)) {
|
| @@ -1333,9 +1337,9 @@ class ErroneousAstConstant extends AstConstant {
|
| }
|
|
|
| // TODO(johnniwinther): Clean this up.
|
| -TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) {
|
| +ResolvedAst _analyzeElementEagerly(Compiler compiler, AstElement element) {
|
| compiler.resolution.computeWorldImpact(element.declaration);
|
| - return element.resolvedAst.elements;
|
| + return element.resolvedAst;
|
| }
|
|
|
| class _CompilerEnvironment implements Environment {
|
|
|