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

Unified Diff: tests/compiler/dart2js/kernel/compiler_helper.dart

Issue 2989453002: Add support for compiling Dart via the FE in dart2js. (Closed)
Patch Set: Created 3 years, 5 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: 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 cc2219aab6751f6e79dec797dbeb13e5f0129559..f6f13097f08922ecadd1f04b96dab00057d8d4cf 100644
--- a/tests/compiler/dart2js/kernel/compiler_helper.dart
+++ b/tests/compiler/dart2js/kernel/compiler_helper.dart
@@ -66,7 +66,7 @@ Future<List<CompileFunction>> compileMultiple(List<String> sources) async {
options: [
Flags.analyzeOnly,
Flags.enableAssertMessage,
- Flags.loadFromDill
+ Flags.previewDart2
]);
ElementResolutionWorldBuilder.useInstantiationMap = true;
compiler2.resolution.retainCachesForTesting = true;
@@ -79,7 +79,7 @@ Future<List<CompileFunction>> compileMultiple(List<String> sources) async {
Expect.isNotNull(library, 'No library found for $uri');
program.mainMethod = compiler.backend.kernelTask.kernel
.functionToIr(library.findExported(Identifiers.main));
- compiler2.libraryLoader = new MemoryDillLibraryLoaderTask(
+ compiler2.libraryLoader = new MemoryKernelLibraryLoaderTask(
elementMap, compiler2.reporter, compiler2.measurer, program);
await compiler2.run(uri);
return compiler2;
@@ -112,13 +112,13 @@ Future<Pair<Compiler, Compiler>> analyzeOnly(
options: [
Flags.analyzeOnly,
Flags.enableAssertMessage,
- Flags.loadFromDill
+ Flags.previewDart2
]);
ElementResolutionWorldBuilder.useInstantiationMap = true;
compiler2.resolution.retainCachesForTesting = true;
KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy;
KernelToElementMapForImpact elementMap = frontendStrategy.elementMap;
- compiler2.libraryLoader = new MemoryDillLibraryLoaderTask(
+ compiler2.libraryLoader = new MemoryKernelLibraryLoaderTask(
elementMap,
compiler2.reporter,
compiler2.measurer,
@@ -127,12 +127,12 @@ Future<Pair<Compiler, Compiler>> analyzeOnly(
return new Pair<Compiler, Compiler>(compiler, compiler2);
}
-class MemoryDillLibraryLoaderTask extends DillLibraryLoaderTask {
+class MemoryKernelLibraryLoaderTask extends KernelLibraryLoaderTask {
final ir.Program program;
- MemoryDillLibraryLoaderTask(KernelToElementMapForImpact elementMap,
+ MemoryKernelLibraryLoaderTask(KernelToElementMapForImpact elementMap,
DiagnosticReporter reporter, Measurer measurer, this.program)
- : super(elementMap, null, null, reporter, measurer);
+ : super(elementMap, null, reporter, measurer);
Future<LoadedLibraries> loadLibrary(Uri resolvedUri,
{bool skipFileWithPartOfTag: false}) async {
@@ -188,7 +188,7 @@ Future<Compiler> compileWithDill(
}
Compiler compiler = compilerFor(
entryPoint: dillFile,
- options: [Flags.loadFromDill]..addAll(options),
+ options: [Flags.previewDart2]..addAll(options),
outputProvider: compilerOutput);
ElementResolutionWorldBuilder.useInstantiationMap = true;
compiler.resolution.retainCachesForTesting = true;

Powered by Google App Engine
This is Rietveld 408576698