| 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 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 Loading... |
| 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 } |
| OLD | NEW |