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

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

Issue 1633863002: Support for constructor references in constant serializer and prelinker. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Record default constructor references as class references Created 4 years, 11 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/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/format.dart
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 9087c1fb633c89eaa455ad2ebe6f0607390eddbc..7a1508a12fe7cfba67b7b5af90fab53a0ee2f8a5 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -164,19 +164,16 @@ enum UnlinkedConstOperation {
* values to create named arguments. Then pop the top `m` values from the
* stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
* from the end) and use them as positional arguments. Use the lists of
- * positional and names arguments to invoke a constant constructor whose name
- * is obtained from [UnlinkedConst.strings], and whose class is obtained from
- * [UnlinkedConst.references], and push the resulting value back onto the
+ * positional and names arguments to invoke a constant constructor obtained
+ * from [UnlinkedConst.references], and push the resulting value back onto the
* stack.
*
* Note that for an invocation of the form `const a.b(...)` (where no type
* arguments are specified), it is impossible to tell from the unresolved AST
* alone whether `a` is a class name and `b` is a constructor name, or `a` is
- * a prefix name and `b` is a class name. In this case it is presumed that
- * `a` is a prefix name and `b` is a class name.
- *
- * TODO(paulberry): figure out how to resolve this ambiguity in the
- * "prelinked" part of the summary.
+ * a prefix name and `b` is a class name. For consistency between AST based
+ * and elements based summaries, references to default constructors are always
+ * recorded as references to corresponding classes.
*/
invokeConstructor,
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698