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

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

Issue 1414913002: Introduce .isMalformed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review Created 5 years, 2 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 | pkg/compiler/lib/src/compiler.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 99672db86ee5e6b9f12b50a9c360cf60b0461019..6fd97b841529024a05c061495e55c39fed4500b1 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -830,7 +830,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
// initializers are handled correctly.
ConstructorElement implementation = target.implementation;
- if (implementation.isErroneous) {
+ if (implementation.isMalformed) {
// TODO(johnniwinther): This should probably be an [ErroneousAstConstant].
return new AstConstant(context, node, new ConstructedConstantExpression(
type, constructor, callStructure, const <ConstantExpression>[]),
@@ -1089,7 +1089,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
* parameters (like [:this.x:]), also updates the [fieldValues] map.
*/
void assignArgumentsToParameters(List<AstConstant> arguments) {
- if (constructor.isErroneous) return;
+ if (constructor.isMalformed) return;
// Assign arguments to parameters.
FunctionSignature signature = constructor.functionSignature;
int index = 0;
@@ -1193,7 +1193,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
* native JavaScript constructor.
*/
void evaluateConstructorFieldValues(List<AstConstant> arguments) {
- if (constructor.isErroneous) return;
+ if (constructor.isMalformed) return;
reporter.withCurrentElement(constructor, () {
assignArgumentsToParameters(arguments);
evaluateConstructorInitializers();
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698