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

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

Issue 2353433002: Use configurations and declared variables to select import/export URIs during prelinking. (Closed)
Patch Set: Cache selected URI. Created 4 years, 3 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 | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | 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/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index d2aa33be0d4e2b9a420017425390af857059323a..92d5cd9382aabfcda88b9c75d2f3d0675269e89d 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -100,10 +100,14 @@ bool isIncrementOrDecrement(UnlinkedExprAssignOperator operator) {
* build unit, and whose values are the corresponding
* [LinkedLibraryBuilder]s.
*/
-Map<String, LinkedLibraryBuilder> link(Set<String> libraryUris,
- GetDependencyCallback getDependency, GetUnitCallback getUnit, bool strong) {
+Map<String, LinkedLibraryBuilder> link(
+ Set<String> libraryUris,
+ GetDependencyCallback getDependency,
+ GetUnitCallback getUnit,
+ GetDeclaredVariable getDeclaredVariable,
+ bool strong) {
Map<String, LinkedLibraryBuilder> linkedLibraries =
- setupForLink(libraryUris, getUnit);
+ setupForLink(libraryUris, getUnit, getDeclaredVariable);
relink(linkedLibraries, getDependency, getUnit, strong);
return linkedLibraries;
}
@@ -135,8 +139,8 @@ void relink(Map<String, LinkedLibraryBuilder> libraries,
* the libraries in this build unit, and whose values are the corresponding
* [LinkedLibraryBuilder]s.
*/
-Map<String, LinkedLibraryBuilder> setupForLink(
- Set<String> libraryUris, GetUnitCallback getUnit) {
+Map<String, LinkedLibraryBuilder> setupForLink(Set<String> libraryUris,
+ GetUnitCallback getUnit, GetDeclaredVariable getDeclaredVariable) {
Map<String, LinkedLibraryBuilder> linkedLibraries =
<String, LinkedLibraryBuilder>{};
for (String absoluteUri in libraryUris) {
@@ -146,7 +150,8 @@ Map<String, LinkedLibraryBuilder> setupForLink(
linkedLibraries[absoluteUri] = prelink(
getUnit(absoluteUri),
getRelativeUnit,
- (String relativeUri) => getRelativeUnit(relativeUri)?.publicNamespace);
+ (String relativeUri) => getRelativeUnit(relativeUri)?.publicNamespace,
+ getDeclaredVariable);
}
return linkedLibraries;
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698