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

Unified Diff: pkg/analyzer/lib/src/summary/idl.dart

Issue 1674073002: Add UnlinkedConst.isValid and set it during summarizing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Generate the 'isInvalid' property. Created 4 years, 10 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 | « pkg/analyzer/lib/src/summary/format.dart ('k') | pkg/analyzer/lib/src/summary/summarize_const_expr.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/idl.dart
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index c911061fdc3c5c367e992fffe9782cf97daea261..ee52e0f45e0024639441798fabbda20d29ea18a1 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -521,6 +521,12 @@ abstract class UnlinkedCombinator extends base.SummaryClass {
*/
abstract class UnlinkedConst extends base.SummaryClass {
/**
+ * Indicates whether the expression is not a valid potentially constant
+ * expression.
+ */
+ bool get isInvalid;
+
+ /**
* Sequence of operations to execute (starting with an empty stack) to form
* the constant value.
*/
@@ -1277,8 +1283,9 @@ abstract class UnlinkedParam extends base.SummaryClass {
int get inferredTypeSlot;
/**
- * If the parameter has a default value the constant expression in the
- * default value.
+ * If the parameter has a default value, the constant expression in the
+ * default value. Note that the presence of this expression does not mean
+ * that it is a valid , check [UnlinkedConst.isValid].
Paul Berry 2016/02/08 17:07:41 Missing a word here. I think you mean: "...that i
*/
UnlinkedConst get defaultValue;
}
@@ -1612,7 +1619,8 @@ abstract class UnlinkedVariable extends base.SummaryClass {
/**
* If [isConst] is true, and the variable has an initializer, the constant
- * expression in the initializer.
+ * expression in the initializer. Note that the presence of this expression
+ * does not mean that it is a valid, check [UnlinkedConst.isValid].
Paul Berry 2016/02/08 17:07:41 Similar comment here.
*/
UnlinkedConst get constExpr;
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | pkg/analyzer/lib/src/summary/summarize_const_expr.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698