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

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: 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_ast.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 921781d10b7d9934fc923d9f62dd43902d991666..ebaad53af7123bb7ffc852005ca23c5e7ef15b5a 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -516,6 +516,12 @@ abstract class UnlinkedCombinator extends base.SummaryClass {
*/
abstract class UnlinkedConst extends base.SummaryClass {
/**
+ * Indicates whether the expression is a valid potentially constant
+ * expression.
+ */
+ bool get isValid;
Paul Berry 2016/02/08 15:02:23 Change this to `isInvalid`. That way in the norma
scheglov 2016/02/08 17:01:42 Done.
+
+ /**
* Sequence of operations to execute (starting with an empty stack) to form
* the constant value.
*/
@@ -1185,8 +1191,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].
*/
UnlinkedConst get defaultValue;
}
@@ -1494,7 +1501,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].
*/
UnlinkedConst get constExpr;
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698