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

Unified Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2898183002: Prepare for development branch by updating externally-used API. (Closed)
Patch Set: Minor tweaks found during testing. Created 3 years, 7 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/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/lib/src/fasta/scope.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/loader.dart
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index 6f4bbb730890e45ff9d2a58aa1601802e9d056e6..ba758acab6dbf567cc414e4644bed689834c52d3 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -43,7 +43,13 @@ abstract class Loader<L> {
///
/// Canonical URIs have schemes like "dart", or "package", and the actual
/// location is often a file URI.
- LibraryBuilder read(Uri uri, [Uri fileUri]) {
+ ///
+ /// The [accessor] is the library that's trying to import, export, or include
+ /// as part [uri], and [charOffset] is the location of the corresponding
+ /// directive. If [accessor] isn't allowed to access [uri], it's a
+ /// compile-time error.
+ LibraryBuilder read(Uri uri, int charOffset,
+ {Uri fileUri, LibraryBuilder accessor}) {
firstSourceUri ??= uri;
LibraryBuilder builder = builders.putIfAbsent(uri, () {
if (fileUri == null) {
@@ -69,12 +75,13 @@ abstract class Loader<L> {
}
return library;
});
+ // TODO(ahe): Check that [accessor] is allowed to access [builder].
return builder;
}
void ensureCoreLibrary() {
if (coreLibrary == null) {
- read(Uri.parse("dart:core"));
+ read(Uri.parse("dart:core"), -1);
assert(coreLibrary != null);
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/lib/src/fasta/scope.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698