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.kernel_target; | 5 library fasta.kernel_target; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import 'dart:io' show File, IOSink; | 9 import 'dart:io' show File, IOSink; |
10 | 10 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 } | 223 } |
224 program = erroneousProgram(isFullProgram); | 224 program = erroneousProgram(isFullProgram); |
225 return uri == null | 225 return uri == null |
226 ? new Future<Program>.value(program) | 226 ? new Future<Program>.value(program) |
227 : writeLinkedProgram(uri, program, isFullProgram: isFullProgram); | 227 : writeLinkedProgram(uri, program, isFullProgram: isFullProgram); |
228 } | 228 } |
229 | 229 |
230 Future<Program> writeOutline(Uri uri) async { | 230 Future<Program> writeOutline(Uri uri) async { |
231 if (loader.first == null) return null; | 231 if (loader.first == null) return null; |
232 try { | 232 try { |
233 loader.createTopLevelTypeInferrer(); | 233 loader.createTypeInferenceEngine(); |
234 await loader.buildOutlines(); | 234 await loader.buildOutlines(); |
235 loader.coreLibrary | 235 loader.coreLibrary |
236 .becomeCoreLibrary(const DynamicType(), const VoidType()); | 236 .becomeCoreLibrary(const DynamicType(), const VoidType()); |
237 dynamicType.bind(loader.coreLibrary["dynamic"]); | 237 dynamicType.bind(loader.coreLibrary["dynamic"]); |
238 loader.resolveParts(); | 238 loader.resolveParts(); |
239 loader.computeLibraryScopes(); | 239 loader.computeLibraryScopes(); |
240 loader.resolveTypes(); | 240 loader.resolveTypes(); |
241 loader.buildProgram(); | 241 loader.buildProgram(); |
242 loader.checkSemantics(); | 242 loader.checkSemantics(); |
243 List<SourceClassBuilder> sourceClasses = collectAllSourceClasses(); | 243 List<SourceClassBuilder> sourceClasses = collectAllSourceClasses(); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 } | 717 } |
718 for (Constructor constructor in superclass.constructors) { | 718 for (Constructor constructor in superclass.constructors) { |
719 if (constructor.name.name.isEmpty) { | 719 if (constructor.name.name.isEmpty) { |
720 return constructor.function.requiredParameterCount == 0 | 720 return constructor.function.requiredParameterCount == 0 |
721 ? constructor | 721 ? constructor |
722 : null; | 722 : null; |
723 } | 723 } |
724 } | 724 } |
725 return null; | 725 return null; |
726 } | 726 } |
OLD | NEW |