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

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

Issue 1826353002: Add a fallback mode for building summaries. (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 798c152803e2c79e4438cb33cd94c99d0e1a16e8..7b529118e12780123c7d9e15fb8c634dff8901a2 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -138,6 +138,29 @@ class PackageBundleAssembler {
final List<String> _unlinkedUnitHashes = <String>[];
/**
+ * Add a fallback library to the package bundle, corresponding to the library
+ * whose defining compilation unit is located at [source]. Caller must also
+ * call [addFallbackUnit] for all compilation units contained in the library
+ * (including the defining compilation unit).
+ */
+ void addFallbackLibrary(Source source) {
+ String uri = source.uri.toString();
+ _linkedLibraryUris.add(uri);
+ _linkedLibraries.add(new LinkedLibraryBuilder(fallbackMode: true));
+ }
+
+ /**
+ * Add a fallback compilation unit to the package bundle, corresponding to
+ * the compilation unit located at [source].
+ */
+ void addFallbackUnit(Source source) {
+ String uri = source.uri.toString();
+ _unlinkedUnitUris.add(uri);
+ _unlinkedUnits
+ .add(new UnlinkedUnitBuilder(fallbackModePath: source.fullName));
+ }
+
+ /**
* Assemble a new [PackageBundleBuilder] using the gathered information.
*/
PackageBundleBuilder assemble() {
« no previous file with comments | « pkg/analyzer/lib/src/summary/package_bundle_reader.dart ('k') | pkg/analyzer/test/src/summary/in_summary_source_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698