Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 1979613002: Use ResolvedAst in constant initializers (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 724e6f669eca41b3b3742ed62d178f622b6ba15a..45d6e6b6a3e9bbdc13344e3a590d49fd93b063b2 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -1187,7 +1187,9 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
* the [fieldValues] map.
*/
void evaluateConstructorInitializers() {
- if (constructor.isSynthesized) {
+ ResolvedAst resolvedAst =
+ compiler.resolution.getResolvedAst(constructor.declaration);
Siggi Cherem (dart-lang) 2016/05/14 00:26:30 constructor.declaration.resolvedAst :)
Johnni Winther 2016/05/18 10:19:50 Done.
+ if (resolvedAst.kind != ResolvedAstKind.PARSED) {
List<AstConstant> compiledArguments = <AstConstant>[];
Function compileArgument = (element) => definitions[element];
@@ -1198,7 +1200,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
evaluateSuperOrRedirectSend(compiledArguments, target);
return;
}
- FunctionExpression functionNode = constructor.node;
+ FunctionExpression functionNode = resolvedAst.node;
NodeList initializerList = functionNode.initializers;
bool foundSuperOrRedirect = false;
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698