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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 | 44 |
45 import 'package:kernel/text/ast_to_text.dart' show Printer; | 45 import 'package:kernel/text/ast_to_text.dart' show Printer; |
46 | 46 |
47 import 'package:kernel/transformations/erasure.dart' show Erasure; | 47 import 'package:kernel/transformations/erasure.dart' show Erasure; |
48 | 48 |
49 import 'package:kernel/transformations/continuation.dart' as transformAsync; | 49 import 'package:kernel/transformations/continuation.dart' as transformAsync; |
50 | 50 |
51 import 'package:kernel/transformations/mixin_full_resolution.dart' | 51 import 'package:kernel/transformations/mixin_full_resolution.dart' |
52 show MixinFullResolution; | 52 show MixinFullResolution; |
53 | 53 |
54 import 'package:kernel/transformations/continuation.dart' as continuation; | |
55 | |
54 import 'package:kernel/transformations/setup_builtin_library.dart' | 56 import 'package:kernel/transformations/setup_builtin_library.dart' |
55 as setup_builtin_library; | 57 as setup_builtin_library; |
56 | 58 |
57 import 'package:kernel/type_algebra.dart' show substitute; | 59 import 'package:kernel/type_algebra.dart' show substitute; |
58 | 60 |
59 import '../source/source_loader.dart' show SourceLoader; | 61 import '../source/source_loader.dart' show SourceLoader; |
60 | 62 |
61 import '../source/source_class_builder.dart' show SourceClassBuilder; | 63 import '../source/source_class_builder.dart' show SourceClassBuilder; |
62 | 64 |
63 import '../target_implementation.dart' show TargetImplementation; | 65 import '../target_implementation.dart' show TargetImplementation; |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 if (loader.first == null) return null; | 260 if (loader.first == null) return null; |
259 if (errors.isNotEmpty) { | 261 if (errors.isNotEmpty) { |
260 return handleInputError(uri, null, isFullProgram: true); | 262 return handleInputError(uri, null, isFullProgram: true); |
261 } | 263 } |
262 try { | 264 try { |
263 await loader.buildBodies(); | 265 await loader.buildBodies(); |
264 loader.finishStaticInvocations(); | 266 loader.finishStaticInvocations(); |
265 finishAllConstructors(); | 267 finishAllConstructors(); |
266 loader.finishNativeMethods(); | 268 loader.finishNativeMethods(); |
267 transformMixinApplications(); | 269 transformMixinApplications(); |
270 continuation.transformProgram(program); | |
ahe
2017/03/31 10:13:09
Can this be moved to otherTransformations?
| |
268 // TODO(ahe): Don't call this from two different places. | 271 // TODO(ahe): Don't call this from two different places. |
269 setup_builtin_library.transformProgram(program); | 272 setup_builtin_library.transformProgram(program); |
270 otherTransformations(); | 273 otherTransformations(); |
271 if (dumpIr) this.dumpIr(); | 274 if (dumpIr) this.dumpIr(); |
272 if (verify) this.verify(); | 275 if (verify) this.verify(); |
273 errors.addAll(loader.collectCompileTimeErrors().map((e) => e.format())); | 276 errors.addAll(loader.collectCompileTimeErrors().map((e) => e.format())); |
274 if (errors.isNotEmpty) { | 277 if (errors.isNotEmpty) { |
275 return handleInputError(uri, null, isFullProgram: true); | 278 return handleInputError(uri, null, isFullProgram: true); |
276 } | 279 } |
277 if (uri == null) return program; | 280 if (uri == null) return program; |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
698 } | 701 } |
699 for (Constructor constructor in superclass.constructors) { | 702 for (Constructor constructor in superclass.constructors) { |
700 if (constructor.name.name.isEmpty) { | 703 if (constructor.name.name.isEmpty) { |
701 return constructor.function.requiredParameterCount == 0 | 704 return constructor.function.requiredParameterCount == 0 |
702 ? constructor | 705 ? constructor |
703 : null; | 706 : null; |
704 } | 707 } |
705 } | 708 } |
706 return null; | 709 return null; |
707 } | 710 } |
OLD | NEW |