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

Side by Side Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2992073002: FE: let targets override whether imports to internal platform libraries (dart:_foo) are allowed. (Closed)
Patch Set: Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/kernel/dart2js_target.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.loader; 5 library fasta.loader;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:collection' show Queue; 9 import 'dart:collection' show Queue;
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (uri.scheme == "dart") { 95 if (uri.scheme == "dart") {
96 target.readPatchFiles(library); 96 target.readPatchFiles(library);
97 } 97 }
98 first ??= library; 98 first ??= library;
99 if (library.loader == this) { 99 if (library.loader == this) {
100 unparsedLibraries.addLast(library); 100 unparsedLibraries.addLast(library);
101 } 101 }
102 return library; 102 return library;
103 }); 103 });
104 if (accessor != null && 104 if (accessor != null &&
105 uri.scheme == "dart" && 105 !target.backendTarget
106 uri.path.startsWith("_") && 106 .allowPlatformPrivateLibraryAccess(accessor.uri, uri)) {
107 accessor.uri.scheme != "dart") {
108 accessor.addCompileTimeError( 107 accessor.addCompileTimeError(
109 messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri); 108 messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri);
110 } 109 }
111 return builder; 110 return builder;
112 } 111 }
113 112
114 void ensureCoreLibrary() { 113 void ensureCoreLibrary() {
115 if (coreLibrary == null) { 114 if (coreLibrary == null) {
116 read(Uri.parse("dart:core"), -1); 115 read(Uri.parse("dart:core"), -1);
117 assert(coreLibrary != null); 116 assert(coreLibrary != null);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 Builder getDuplicatedFieldInitializerError() { 190 Builder getDuplicatedFieldInitializerError() {
192 return target.getDuplicatedFieldInitializerError(this); 191 return target.getDuplicatedFieldInitializerError(this);
193 } 192 }
194 193
195 Builder getNativeAnnotation() => target.getNativeAnnotation(this); 194 Builder getNativeAnnotation() => target.getNativeAnnotation(this);
196 } 195 }
197 196
198 String format(double d, int fractionDigits, int width) { 197 String format(double d, int fractionDigits, int width) {
199 return d.toStringAsFixed(fractionDigits).padLeft(width); 198 return d.toStringAsFixed(fractionDigits).padLeft(width);
200 } 199 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/dart2js_target.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698