| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 fileUri = uri; | 77 fileUri = uri; |
| 78 break; | 78 break; |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 LibraryBuilder library = | 81 LibraryBuilder library = |
| 82 target.createLibraryBuilder(uri, fileUri, isPatch); | 82 target.createLibraryBuilder(uri, fileUri, isPatch); |
| 83 if (uri.scheme == "dart" && uri.path == "core") { | 83 if (uri.scheme == "dart" && uri.path == "core") { |
| 84 coreLibrary = library; | 84 coreLibrary = library; |
| 85 target.loadExtraRequiredLibraries(this); | 85 target.loadExtraRequiredLibraries(this); |
| 86 } | 86 } |
| 87 if (target.backendTarget.mayDefineRestrictedType(uri)) { | |
| 88 library.mayImplementRestrictedTypes = true; | |
| 89 } | |
| 90 if (uri.scheme == "dart") { | 87 if (uri.scheme == "dart") { |
| 91 target.readPatchFiles(library); | 88 target.readPatchFiles(library); |
| 92 } | 89 } |
| 93 first ??= library; | 90 first ??= library; |
| 94 if (library.loader == this) { | 91 if (library.loader == this) { |
| 95 unparsedLibraries.addLast(library); | 92 unparsedLibraries.addLast(library); |
| 96 } | 93 } |
| 97 return library; | 94 return library; |
| 98 }); | 95 }); |
| 99 if (accessor != null && | 96 if (accessor != null && |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 Builder getDuplicatedFieldInitializerError() { | 182 Builder getDuplicatedFieldInitializerError() { |
| 186 return target.getDuplicatedFieldInitializerError(this); | 183 return target.getDuplicatedFieldInitializerError(this); |
| 187 } | 184 } |
| 188 | 185 |
| 189 Builder getNativeAnnotation() => target.getNativeAnnotation(this); | 186 Builder getNativeAnnotation() => target.getNativeAnnotation(this); |
| 190 } | 187 } |
| 191 | 188 |
| 192 String format(double d, int fractionDigits, int width) { | 189 String format(double d, int fractionDigits, int width) { |
| 193 return d.toStringAsFixed(fractionDigits).padLeft(width); | 190 return d.toStringAsFixed(fractionDigits).padLeft(width); |
| 194 } | 191 } |
| OLD | NEW |