OLD | NEW |
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 Loading... |
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 !accessor.isPatch && |
105 !target.backendTarget | 106 !target.backendTarget |
106 .allowPlatformPrivateLibraryAccess(accessor.uri, uri)) { | 107 .allowPlatformPrivateLibraryAccess(accessor.uri, uri)) { |
107 accessor.addCompileTimeError( | 108 accessor.addCompileTimeError( |
108 messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri); | 109 messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri); |
109 } | 110 } |
110 return builder; | 111 return builder; |
111 } | 112 } |
112 | 113 |
113 void ensureCoreLibrary() { | 114 void ensureCoreLibrary() { |
114 if (coreLibrary == null) { | 115 if (coreLibrary == null) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 Builder getDuplicatedFieldInitializerError() { | 191 Builder getDuplicatedFieldInitializerError() { |
191 return target.getDuplicatedFieldInitializerError(this); | 192 return target.getDuplicatedFieldInitializerError(this); |
192 } | 193 } |
193 | 194 |
194 Builder getNativeAnnotation() => target.getNativeAnnotation(this); | 195 Builder getNativeAnnotation() => target.getNativeAnnotation(this); |
195 } | 196 } |
196 | 197 |
197 String format(double d, int fractionDigits, int width) { | 198 String format(double d, int fractionDigits, int width) { |
198 return d.toStringAsFixed(fractionDigits).padLeft(width); | 199 return d.toStringAsFixed(fractionDigits).padLeft(width); |
199 } | 200 } |
OLD | NEW |