| 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 | 7 import 'dart:async' show |
| 8 Future; | 8 Future; |
| 9 | 9 |
| 10 import 'dart:io' show | 10 import 'dart:io' show |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 if (astKind == AstKind.Analyzer) { | 222 if (astKind == AstKind.Analyzer) { |
| 223 loader.buildElementStore(); | 223 loader.buildElementStore(); |
| 224 } else { | 224 } else { |
| 225 loader.computeHierarchy(program); | 225 loader.computeHierarchy(program); |
| 226 } | 226 } |
| 227 await loader.buildBodies(astKind); | 227 await loader.buildBodies(astKind); |
| 228 loader.finishStaticInvocations(); | 228 loader.finishStaticInvocations(); |
| 229 finishAllConstructors(); | 229 finishAllConstructors(); |
| 230 loader.finishNativeMethods(); | 230 loader.finishNativeMethods(); |
| 231 transformMixinApplications(); | 231 transformMixinApplications(); |
| 232 // TODO(ahe): Don't call this from two different places. |
| 233 setup_builtin_library.transformProgram(program); |
| 232 errors.addAll(loader.collectCompileTimeErrors().map((e) => e.format())); | 234 errors.addAll(loader.collectCompileTimeErrors().map((e) => e.format())); |
| 233 if (errors.isNotEmpty) { | 235 if (errors.isNotEmpty) { |
| 234 return handleInputError(uri, null, isFullProgram: true); | 236 return handleInputError(uri, null, isFullProgram: true); |
| 235 } | 237 } |
| 236 if (uri == null) return program; | 238 if (uri == null) return program; |
| 237 return await writeLinkedProgram(uri, program, isFullProgram: true); | 239 return await writeLinkedProgram(uri, program, isFullProgram: true); |
| 238 } on InputError catch (e) { | 240 } on InputError catch (e) { |
| 239 return handleInputError(uri, e, isFullProgram: true); | 241 return handleInputError(uri, e, isFullProgram: true); |
| 240 } catch (e, s) { | 242 } catch (e, s) { |
| 241 return reportCrash(e, s, loader?.currentUriForCrashReporting); | 243 return reportCrash(e, s, loader?.currentUriForCrashReporting); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 superclass = superclass.superclass; | 581 superclass = superclass.superclass; |
| 580 } | 582 } |
| 581 for (Constructor constructor in superclass.constructors) { | 583 for (Constructor constructor in superclass.constructors) { |
| 582 if (constructor.name.name.isEmpty) { | 584 if (constructor.name.name.isEmpty) { |
| 583 return constructor.function.requiredParameterCount == 0 ? | 585 return constructor.function.requiredParameterCount == 0 ? |
| 584 constructor : null; | 586 constructor : null; |
| 585 } | 587 } |
| 586 } | 588 } |
| 587 return null; | 589 return null; |
| 588 } | 590 } |
| OLD | NEW |