Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2912503003: Perform MixinFullResolution only for source libraries. (Closed)
Patch Set: Assert that only classes that declared in the libraries to be transformed are transformed. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/kernel/bin/transform.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 TypeParameter, 38 TypeParameter,
39 VariableDeclaration, 39 VariableDeclaration,
40 VariableGet, 40 VariableGet,
41 VoidType; 41 VoidType;
42 42
43 import 'package:kernel/core_types.dart' show CoreTypes; 43 import 'package:kernel/core_types.dart' show CoreTypes;
44 import 'package:kernel/transformations/erasure.dart' show Erasure; 44 import 'package:kernel/transformations/erasure.dart' show Erasure;
45 45
46 import 'package:kernel/transformations/continuation.dart' as transformAsync; 46 import 'package:kernel/transformations/continuation.dart' as transformAsync;
47 47
48 import 'package:kernel/transformations/mixin_full_resolution.dart' 48 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
49 show MixinFullResolution;
50 49
51 import 'package:kernel/type_algebra.dart' show substitute; 50 import 'package:kernel/type_algebra.dart' show substitute;
52 51
53 import '../source/source_loader.dart' show SourceLoader; 52 import '../source/source_loader.dart' show SourceLoader;
54 53
55 import '../source/source_class_builder.dart' show SourceClassBuilder; 54 import '../source/source_class_builder.dart' show SourceClassBuilder;
56 55
57 import '../target_implementation.dart' show TargetImplementation; 56 import '../target_implementation.dart' show TargetImplementation;
58 57
59 import '../translate_uri.dart' show TranslateUri; 58 import '../translate_uri.dart' show TranslateUri;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 654 }
656 655
657 /// Run all transformations that are needed when building a program for the 656 /// Run all transformations that are needed when building a program for the
658 /// first time. 657 /// first time.
659 void runBuildTransformations() { 658 void runBuildTransformations() {
660 transformMixinApplications(); 659 transformMixinApplications();
661 otherTransformations(); 660 otherTransformations();
662 } 661 }
663 662
664 void transformMixinApplications() { 663 void transformMixinApplications() {
665 new MixinFullResolution(backendTarget).transform(_program); 664 mix.transformLibraries(backendTarget, loader.libraries);
666 ticker.logMs("Transformed mixin applications"); 665 ticker.logMs("Transformed mixin applications");
667 } 666 }
668 667
669 void otherTransformations() { 668 void otherTransformations() {
670 // TODO(ahe): Don't generate type variables in the first place. 669 // TODO(ahe): Don't generate type variables in the first place.
671 if (!strongMode) { 670 if (!strongMode) {
672 _program.accept(new Erasure()); 671 _program.accept(new Erasure());
673 ticker.logMs("Erased type variables in generic methods"); 672 ticker.logMs("Erased type variables in generic methods");
674 } 673 }
675 var coreTypes = new CoreTypes(_program); 674 var coreTypes = new CoreTypes(_program);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 721 }
723 for (Constructor constructor in superclass.constructors) { 722 for (Constructor constructor in superclass.constructors) {
724 if (constructor.name.name.isEmpty) { 723 if (constructor.name.name.isEmpty) {
725 return constructor.function.requiredParameterCount == 0 724 return constructor.function.requiredParameterCount == 0
726 ? constructor 725 ? constructor
727 : null; 726 : null;
728 } 727 }
729 } 728 }
730 return null; 729 return null;
731 } 730 }
OLDNEW
« no previous file with comments | « no previous file | pkg/kernel/bin/transform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698