Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/ast.dart |
| diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart |
| index f937b19babee1019a1905b68e52e06330394a0a4..caacce55df57d4ae76cc30e519dbb9f08a6f5687 100644 |
| --- a/pkg/analyzer/lib/src/generated/ast.dart |
| +++ b/pkg/analyzer/lib/src/generated/ast.dart |
| @@ -5309,6 +5309,18 @@ class ConstantEvaluator extends GeneralizingAstVisitor<Object> { |
| } |
| /** |
| + * Object representing a "const" instance creation expression, and its |
| + * evaluation result. This is used as the target for constant evaluation of |
| + * instance creation expressions. |
| + */ |
| +class ConstantInstanceCreationHandle { |
|
Brian Wilkerson
2015/04/01 20:31:54
Do you mean "target" as in AnalysisTarget? If so,
Paul Berry
2015/04/02 15:18:49
Yes, that was what I meant. I've changed the comm
|
| + /** |
| + * The result of evaluating the constant. |
| + */ |
| + EvaluationResultImpl evaluationResult; |
| +} |
| + |
| +/** |
| * A constructor declaration. |
| * |
| * > constructorDeclaration ::= |
| @@ -10625,9 +10637,10 @@ class InstanceCreationExpression extends Expression { |
| ConstructorElement staticElement; |
| /** |
| - * The result of evaluating this expression, if it is constant. |
| + * The [ConstantInstanceCreationHandle] holding the result of evaluating this |
| + * expression, if it is constant. |
| */ |
| - EvaluationResultImpl evaluationResult; |
| + ConstantInstanceCreationHandle constantHandle; |
| /** |
| * Initialize a newly created instance creation expression. |
| @@ -10675,6 +10688,16 @@ class InstanceCreationExpression extends Expression { |
| Token get endToken => _argumentList.endToken; |
| /** |
| + * The result of evaluating this expression, if it is constant. |
| + */ |
| + EvaluationResultImpl get evaluationResult { |
| + if (constantHandle != null) { |
| + return constantHandle.evaluationResult; |
| + } |
| + return null; |
| + } |
| + |
| + /** |
| * Return `true` if this creation expression is used to invoke a constant |
| * constructor. |
| */ |