Index: tests/compiler/dart2js/kernel/compiler_helper.dart |
diff --git a/tests/compiler/dart2js/kernel/compiler_helper.dart b/tests/compiler/dart2js/kernel/compiler_helper.dart |
index 3e046e21091131ef760218717692a22423c462f0..e69a5fd2d00a73bd61bf34e716c9d3513c8c0615 100644 |
--- a/tests/compiler/dart2js/kernel/compiler_helper.dart |
+++ b/tests/compiler/dart2js/kernel/compiler_helper.dart |
@@ -141,7 +141,9 @@ class MemoryDillLibraryLoaderTask extends DillLibraryLoaderTask { |
Future<Compiler> compileWithDill( |
Uri entryPoint, Map<String, String> memorySourceFiles, List<String> options, |
- {bool printSteps: false, CompilerOutput compilerOutput}) async { |
+ {bool printSteps: false, |
+ CompilerOutput compilerOutput, |
+ void beforeRun(Compiler compiler)}) async { |
if (memorySourceFiles.isNotEmpty) { |
Directory dir = await Directory.systemTemp.createTemp('dart2js-with-dill'); |
if (printSteps) { |
@@ -174,6 +176,9 @@ Future<Compiler> compileWithDill( |
outputProvider: compilerOutput); |
ElementResolutionWorldBuilder.useInstantiationMap = true; |
compiler.resolution.retainCachesForTesting = true; |
+ if (beforeRun != null) { |
+ beforeRun(compiler); |
+ } |
await compiler.run(dillFile); |
return compiler; |
} |