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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_const_expr.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
Index: pkg/analyzer/lib/src/summary/summarize_const_expr.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index a59501d186f71e1d8bb4f6e7e0254ab0e378219b..9305cfbebfad883c1428d39337a8683da1afdb07 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -113,6 +113,11 @@ abstract class AbstractConstExprSerializer {
EntityRefBuilder serializeType(TypeName type);
/**
+ * Return [EntityRefBuilder] that corresponds to the given [constructor].
+ */
+ EntityRefBuilder serializeConstructorName(ConstructorName constructor);
+
+ /**
* Return the [UnlinkedConstBuilder] that corresponds to the state of this
* serializer.
*/
@@ -204,12 +209,7 @@ abstract class AbstractConstExprSerializer {
strings.addAll(argumentNames);
ints.add(arguments.length - argumentNames.length);
// Serialize the reference.
- references.add(serializeType(constructor.type));
- if (constructor.name != null) {
- strings.add(constructor.name.name);
- } else {
- strings.add('');
- }
+ references.add(serializeConstructorName(constructor));
}
void _serializeListLiteral(ListLiteral expr) {
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698