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

Unified Diff: pkg/kernel/test/baseline_tester.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/baseline_tester.dart
diff --git a/pkg/kernel/test/baseline_tester.dart b/pkg/kernel/test/baseline_tester.dart
index c3a0b5a43050080dd2ada7a4dfd3d50127308256..a7b3715d0872d3a884bbb1e07ab8688a2fcc1548 100644
--- a/pkg/kernel/test/baseline_tester.dart
+++ b/pkg/kernel/test/baseline_tester.dart
@@ -5,6 +5,7 @@ import 'dart:io';
import 'package:analyzer/src/kernel/loader.dart';
import 'package:kernel/application_root.dart';
+import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/core_types.dart';
import 'package:kernel/kernel.dart';
import 'package:kernel/target/targets.dart';
@@ -27,7 +28,7 @@ abstract class TestTarget extends Target {
// Return a list of strings so that we can accumulate errors.
List<String> performModularTransformations(
- CoreTypes coreTypes, Program program);
+ CoreTypes coreTypes, ClassHierarchy hierarchy, Program program);
List<String> performGlobalTransformations(
CoreTypes coreTypes, Program program);
}
@@ -49,6 +50,7 @@ void runBaselineTests(String folderName, TestTarget target) {
var program = new Program();
var coreTypes = new CoreTypes(program);
+ var hierarchy = new ClosedWorldClassHierarchy(program);
var loader = await batch.getLoader(
program,
new DartOptions(
@@ -59,7 +61,8 @@ void runBaselineTests(String folderName, TestTarget target) {
loader.loadProgram(dartPath, target: target);
verifyProgram(program);
var errors = <String>[];
- errors.addAll(target.performModularTransformations(coreTypes, program));
+ errors.addAll(target.performModularTransformations(
+ coreTypes, hierarchy, program));
verifyProgram(program);
errors.addAll(target.performGlobalTransformations(coreTypes, program));
verifyProgram(program);

Powered by Google App Engine
This is Rietveld 408576698