| 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.source_loader; | 5 library fasta.source_loader; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:typed_data' show Uint8List; | 9 import 'dart:typed_data' show Uint8List; |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 listener.uri = part.fileUri; | 122 listener.uri = part.fileUri; |
| 123 parser.parseUnit(tokens); | 123 parser.parseUnit(tokens); |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 KernelTarget get target => super.target; | 129 KernelTarget get target => super.target; |
| 130 | 130 |
| 131 DietListener createDietListener(LibraryBuilder library) { | 131 DietListener createDietListener(LibraryBuilder library) { |
| 132 var typeInferrer = target.strongMode | 132 var typeInferrer = new KernelTypeInferrer( |
| 133 ? new KernelTypeInferrer(coreTypes, hierarchy, instrumentation) | 133 coreTypes, hierarchy, instrumentation, target.strongMode); |
| 134 : null; | |
| 135 return new DietListener(library, hierarchy, coreTypes, typeInferrer); | 134 return new DietListener(library, hierarchy, coreTypes, typeInferrer); |
| 136 } | 135 } |
| 137 | 136 |
| 138 void resolveParts() { | 137 void resolveParts() { |
| 139 List<Uri> parts = <Uri>[]; | 138 List<Uri> parts = <Uri>[]; |
| 140 builders.forEach((Uri uri, LibraryBuilder library) { | 139 builders.forEach((Uri uri, LibraryBuilder library) { |
| 141 if (library is SourceLibraryBuilder) { | 140 if (library is SourceLibraryBuilder) { |
| 142 if (library.isPart) { | 141 if (library.isPart) { |
| 143 library.validatePart(); | 142 library.validatePart(); |
| 144 parts.add(uri); | 143 parts.add(uri); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 void checkOverrides(List<SourceClassBuilder> sourceClasses) { | 363 void checkOverrides(List<SourceClassBuilder> sourceClasses) { |
| 365 assert(hierarchy != null); | 364 assert(hierarchy != null); |
| 366 for (SourceClassBuilder builder in sourceClasses) { | 365 for (SourceClassBuilder builder in sourceClasses) { |
| 367 builder.checkOverrides(hierarchy); | 366 builder.checkOverrides(hierarchy); |
| 368 } | 367 } |
| 369 ticker.logMs("Checked overrides"); | 368 ticker.logMs("Checked overrides"); |
| 370 } | 369 } |
| 371 | 370 |
| 372 List<Uri> getDependencies() => sourceBytes.keys.toList(); | 371 List<Uri> getDependencies() => sourceBytes.keys.toList(); |
| 373 } | 372 } |
| OLD | NEW |