| 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; | 9 import 'dart:io' show File; |
| 10 | 10 |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 } | 652 } |
| 653 | 653 |
| 654 /// Run all transformations that are needed when building a program for the | 654 /// Run all transformations that are needed when building a program for the |
| 655 /// first time. | 655 /// first time. |
| 656 void runBuildTransformations() { | 656 void runBuildTransformations() { |
| 657 transformMixinApplications(); | 657 transformMixinApplications(); |
| 658 otherTransformations(); | 658 otherTransformations(); |
| 659 } | 659 } |
| 660 | 660 |
| 661 void transformMixinApplications() { | 661 void transformMixinApplications() { |
| 662 mix.transformLibraries(backendTarget, loader.coreTypes, loader.libraries); | 662 mix.transformLibraries( |
| 663 backendTarget, loader.coreTypes, loader.hierarchy, loader.libraries); |
| 663 ticker.logMs("Transformed mixin applications"); | 664 ticker.logMs("Transformed mixin applications"); |
| 664 } | 665 } |
| 665 | 666 |
| 666 void otherTransformations() { | 667 void otherTransformations() { |
| 667 // TODO(ahe): Don't generate type variables in the first place. | 668 // TODO(ahe): Don't generate type variables in the first place. |
| 668 if (!strongMode) { | 669 if (!strongMode) { |
| 669 _program.accept(new Erasure()); | 670 _program.accept(new Erasure()); |
| 670 ticker.logMs("Erased type variables in generic methods"); | 671 ticker.logMs("Erased type variables in generic methods"); |
| 671 } | 672 } |
| 672 // TODO(kmillikin): Make this run on a per-method basis. | 673 // TODO(kmillikin): Make this run on a per-method basis. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 } | 719 } |
| 719 for (Constructor constructor in superclass.constructors) { | 720 for (Constructor constructor in superclass.constructors) { |
| 720 if (constructor.name.name.isEmpty) { | 721 if (constructor.name.name.isEmpty) { |
| 721 return constructor.function.requiredParameterCount == 0 | 722 return constructor.function.requiredParameterCount == 0 |
| 722 ? constructor | 723 ? constructor |
| 723 : null; | 724 : null; |
| 724 } | 725 } |
| 725 } | 726 } |
| 726 return null; | 727 return null; |
| 727 } | 728 } |
| OLD | NEW |