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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2531723002: Store individual LinkedLibrary objects instead of PackageBundle(s). (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index f25ac4a2a7c2d0da0ad8a5aaec856483db413e1b..6d7fdd128bad99477f4e754fa82f573484791f4d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -24,7 +24,6 @@ import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/link.dart';
import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/summary/summarize_elements.dart';
/**
* This class computes [AnalysisResult]s for Dart files.
@@ -69,7 +68,7 @@ class AnalysisDriver {
/**
* The version of data format, should be incremented on every format change.
*/
- static const int DATA_VERSION = 7;
+ static const int DATA_VERSION = 8;
/**
* The name of the driver, e.g. the name of the folder.
@@ -568,9 +567,6 @@ class AnalysisDriver {
/**
* Return the context in which the [library] should be analyzed it.
- *
- * TODO(scheglov) We often don't need [SummaryDataStore], only dependency
- * signature.
*/
_LibraryContext _createLibraryContext(FileState library) {
return _logger.run('Create library context', () {
@@ -615,9 +611,8 @@ class AnalysisDriver {
String key = '${library.transitiveSignature}.linked';
List<int> bytes = _byteStore.get(key);
if (bytes != null) {
- PackageBundle linked = new PackageBundle.fromBuffer(bytes);
- _addToStoreLinked(
- store, library.uriStr, linked.linkedLibraries.single);
+ LinkedLibrary linked = new LinkedLibrary.fromBuffer(bytes);
+ _addToStoreLinked(store, library.uriStr, linked);
} else {
libraryUrisToLink.add(library.uriStr);
}
@@ -641,14 +636,9 @@ class AnalysisDriver {
linkedLibraries.forEach((uri, linkedBuilder) {
FileState library = libraries[uri];
String key = '${library.transitiveSignature}.linked';
- List<int> bytes;
- {
- PackageBundleAssembler assembler = new PackageBundleAssembler();
- assembler.addLinkedLibrary(uri, linkedBuilder);
- bytes = assembler.assemble().toBuffer();
- }
- PackageBundle linked = new PackageBundle.fromBuffer(bytes);
- _addToStoreLinked(store, uri, linked.linkedLibraries.single);
+ List<int> bytes = linkedBuilder.toBuffer();
+ LinkedLibrary linked = new LinkedLibrary.fromBuffer(bytes);
+ _addToStoreLinked(store, uri, linked);
_byteStore.put(key, bytes);
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698