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

Unified Diff: pkg/kernel/test/baseline_tester.dart

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: Don't create CoreTypes in createOutlines() on InputError. 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
« no previous file with comments | « pkg/kernel/lib/transformations/treeshaker.dart ('k') | pkg/kernel/test/closures/suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/test/baseline_tester.dart
diff --git a/pkg/kernel/test/baseline_tester.dart b/pkg/kernel/test/baseline_tester.dart
index 81ab6c9561365f0b6b871c559e9fbe451df0a420..c3a0b5a43050080dd2ada7a4dfd3d50127308256 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/core_types.dart';
import 'package:kernel/kernel.dart';
import 'package:kernel/target/targets.dart';
import 'package:kernel/text/ast_to_text.dart';
@@ -25,8 +26,10 @@ abstract class TestTarget extends Target {
Annotator get annotator => null;
// Return a list of strings so that we can accumulate errors.
- List<String> performModularTransformations(Program program);
- List<String> performGlobalTransformations(Program program);
+ List<String> performModularTransformations(
+ CoreTypes coreTypes, Program program);
+ List<String> performGlobalTransformations(
+ CoreTypes coreTypes, Program program);
}
void runBaselineTests(String folderName, TestTarget target) {
@@ -45,6 +48,7 @@ void runBaselineTests(String folderName, TestTarget target) {
String filenameOfCurrent = '$outputDirectory/$shortName.current.txt';
var program = new Program();
+ var coreTypes = new CoreTypes(program);
var loader = await batch.getLoader(
program,
new DartOptions(
@@ -55,9 +59,9 @@ void runBaselineTests(String folderName, TestTarget target) {
loader.loadProgram(dartPath, target: target);
verifyProgram(program);
var errors = <String>[];
- errors.addAll(target.performModularTransformations(program));
+ errors.addAll(target.performModularTransformations(coreTypes, program));
verifyProgram(program);
- errors.addAll(target.performGlobalTransformations(program));
+ errors.addAll(target.performGlobalTransformations(coreTypes, program));
verifyProgram(program);
var buffer = new StringBuffer();
« no previous file with comments | « pkg/kernel/lib/transformations/treeshaker.dart ('k') | pkg/kernel/test/closures/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698