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

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

Issue 1841433002: Fix summary handling of enum values. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 8078aaa16549189c80095112eeb4d13b865ad2a4..97ee5e32c02711963a57daa413ebd3ac83e2772f 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -137,17 +137,6 @@ class PackageBundleAssembler {
final List<UnlinkedUnitBuilder> _unlinkedUnits = <UnlinkedUnitBuilder>[];
final List<String> _unlinkedUnitHashes = <String>[];
- void addLinkedLibrary(String uri, LinkedLibraryBuilder library) {
- _linkedLibraries.add(library);
- _linkedLibraryUris.add(uri);
- }
-
- void addUnlinkedUnit(Source source, UnlinkedUnitBuilder unit) {
- _unlinkedUnitUris.add(source.uri.toString());
- _unlinkedUnits.add(unit);
- _unlinkedUnitHashes.add(_hash(source.contents.data));
- }
-
/**
* Add a fallback library to the package bundle, corresponding to the library
* whose defining compilation unit is located at [source]. Caller must also
@@ -171,6 +160,17 @@ class PackageBundleAssembler {
.add(new UnlinkedUnitBuilder(fallbackModePath: source.fullName));
}
+ void addLinkedLibrary(String uri, LinkedLibraryBuilder library) {
+ _linkedLibraries.add(library);
+ _linkedLibraryUris.add(uri);
+ }
+
+ void addUnlinkedUnit(Source source, UnlinkedUnitBuilder unit) {
+ _unlinkedUnitUris.add(source.uri.toString());
+ _unlinkedUnits.add(unit);
+ _unlinkedUnitHashes.add(_hash(source.contents.data));
+ }
+
/**
* Assemble a new [PackageBundleBuilder] using the gathered information.
*/
@@ -346,7 +346,9 @@ class _CompilationUnitSerializer {
for (ClassElement enm in compilationUnit.enums) {
if (enm.isPublic) {
names.add(new UnlinkedPublicNameBuilder(
- kind: ReferenceKind.classOrEnum, name: enm.name));
+ kind: ReferenceKind.classOrEnum,
+ name: enm.name,
+ members: serializeClassConstMembers(enm)));
}
}
for (FunctionElement function in compilationUnit.functions) {
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698