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

Unified Diff: pkg/kernel/bin/transform.dart

Issue 2918593003: Pass ClassHierarchy instead of creating it. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/kernel/bin/transform.dart
diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
index 01562a258028ef3b1925401ca7bc2428a32324f9..7f9d3a59c02c1ec3a86ec61be83775b0d63100e9 100755
--- a/pkg/kernel/bin/transform.dart
+++ b/pkg/kernel/bin/transform.dart
@@ -7,6 +7,7 @@ import 'dart:async';
import 'dart:io';
import 'package:args/args.dart';
+import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/core_types.dart';
import 'package:kernel/kernel.dart';
import 'package:kernel/target/targets.dart';
@@ -77,23 +78,24 @@ Future<CompilerOutcome> runTransformation(List<String> arguments) async {
var program = loadProgramFromBinary(input);
var coreTypes = new CoreTypes(program);
+ var hierarchy = new ClosedWorldClassHierarchy(program);
switch (options['transformation']) {
case 'continuation':
program = cont.transformProgram(coreTypes, program);
break;
case 'resolve-mixins':
mix.transformLibraries(
- new NoneTarget(null), coreTypes, program.libraries);
+ new NoneTarget(null), coreTypes, hierarchy, program.libraries);
break;
case 'closures':
program = closures.transformProgram(coreTypes, program);
break;
case 'treeshake':
- program = treeshaker.transformProgram(coreTypes, program,
+ program = treeshaker.transformProgram(coreTypes, hierarchy, program,
programRoots: programRoots);
break;
case 'methodcall':
- program = method_call.transformProgram(coreTypes, program);
+ program = method_call.transformProgram(coreTypes, hierarchy, program);
break;
case 'empty':
program = empty.transformProgram(program);

Powered by Google App Engine
This is Rietveld 408576698