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

Side by Side Diff: pkg/kernel/bin/transform.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
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:args/args.dart'; 9 import 'package:args/args.dart';
10 import 'package:kernel/kernel.dart'; 10 import 'package:kernel/kernel.dart';
11 import 'package:kernel/target/targets.dart';
11 import 'package:kernel/transformations/closure_conversion.dart' as closures; 12 import 'package:kernel/transformations/closure_conversion.dart' as closures;
12 import 'package:kernel/transformations/continuation.dart' as cont; 13 import 'package:kernel/transformations/continuation.dart' as cont;
13 import 'package:kernel/transformations/empty.dart' as empty; 14 import 'package:kernel/transformations/empty.dart' as empty;
14 import 'package:kernel/transformations/method_call.dart' as method_call; 15 import 'package:kernel/transformations/method_call.dart' as method_call;
15 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix; 16 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
16 import 'package:kernel/transformations/treeshaker.dart' as treeshaker; 17 import 'package:kernel/transformations/treeshaker.dart' as treeshaker;
17 import 'package:kernel/verifier.dart'; 18 import 'package:kernel/verifier.dart';
18 19
19 import 'batch_util.dart'; 20 import 'batch_util.dart';
20 import 'util.dart'; 21 import 'util.dart';
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 options['embedder-entry-points-manifest'] as List<String>; 73 options['embedder-entry-points-manifest'] as List<String>;
73 List<treeshaker.ProgramRoot> programRoots = 74 List<treeshaker.ProgramRoot> programRoots =
74 parseProgramRoots(embedderEntryPointManifests); 75 parseProgramRoots(embedderEntryPointManifests);
75 76
76 var program = loadProgramFromBinary(input); 77 var program = loadProgramFromBinary(input);
77 switch (options['transformation']) { 78 switch (options['transformation']) {
78 case 'continuation': 79 case 'continuation':
79 program = cont.transformProgram(program); 80 program = cont.transformProgram(program);
80 break; 81 break;
81 case 'resolve-mixins': 82 case 'resolve-mixins':
82 program = mix.transformProgram(program); 83 mix.transformLibraries(new NoneTarget(null), program.libraries);
83 break; 84 break;
84 case 'closures': 85 case 'closures':
85 program = closures.transformProgram(program); 86 program = closures.transformProgram(program);
86 break; 87 break;
87 case 'treeshake': 88 case 'treeshake':
88 program = 89 program =
89 treeshaker.transformProgram(program, programRoots: programRoots); 90 treeshaker.transformProgram(program, programRoots: programRoots);
90 break; 91 break;
91 case 'methodcall': 92 case 'methodcall':
92 program = method_call.transformProgram(program); 93 program = method_call.transformProgram(program);
(...skipping 13 matching lines...) Expand all
106 assert(format == 'bin'); 107 assert(format == 'bin');
107 await writeProgramToBinary(program, output); 108 await writeProgramToBinary(program, output);
108 } 109 }
109 110
110 if (verbose) { 111 if (verbose) {
111 writeLibraryToText(program.mainMethod.parent as Library); 112 writeLibraryToText(program.mainMethod.parent as Library);
112 } 113 }
113 114
114 return CompilerOutcome.Ok; 115 return CompilerOutcome.Ok;
115 } 116 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/kernel/lib/target/flutter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698