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

Unified Diff: pkg/kernel/test/treeshaker_check.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/test/treeshaker_check.dart
diff --git a/pkg/kernel/test/treeshaker_check.dart b/pkg/kernel/test/treeshaker_check.dart
index 32de08f062d3f55fbda105f6a6d39e57ec075ac3..b7a94719c0110b7e419ca1558eeb3ef5bc0ea520 100644
--- a/pkg/kernel/test/treeshaker_check.dart
+++ b/pkg/kernel/test/treeshaker_check.dart
@@ -3,10 +3,12 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.treeshaker_check;
+import 'dart:io';
+
+import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/core_types.dart';
import 'package:kernel/kernel.dart';
import 'package:kernel/transformations/treeshaker.dart';
-import 'dart:io';
String usage = '''
Usage: treeshaker_check FILE.dill
@@ -21,7 +23,8 @@ main(List<String> args) {
}
var program = loadProgramFromBinary(args[0]);
var coreTypes = new CoreTypes(program);
- var shaker = new TreeShaker(coreTypes, program);
+ var hierarchy = new ClosedWorldClassHierarchy(program);
+ var shaker = new TreeShaker(coreTypes, hierarchy, program);
shaker.transform(program);
new TreeShakingSanityCheck(shaker).visit(program);
}

Powered by Google App Engine
This is Rietveld 408576698