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

Unified Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/memory_compiler.dart
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart
index 3712603dbc70da3142ad4e9f22c091e098a30ed8..92cb2c48e364ef1fe41efa9d7a01dc2b13d62660 100644
--- a/tests/compiler/dart2js/memory_compiler.dart
+++ b/tests/compiler/dart2js/memory_compiler.dart
@@ -11,6 +11,7 @@ import 'package:compiler/compiler.dart' show
import 'package:compiler/compiler_new.dart' show
CompilationResult,
CompilerDiagnostics,
+ CompilerOptions,
CompilerOutput,
Diagnostic,
PackagesDiscoveryProvider;
@@ -74,6 +75,7 @@ Future<CompilationResult> runCompiler(
List<String> options: const <String>[],
CompilerImpl cachedCompiler,
bool showDiagnostics: true,
+ bool disableInlining: false,
Uri packageRoot,
Uri packageConfig,
PackagesDiscoveryProvider packagesDiscoveryProvider,
@@ -82,9 +84,11 @@ Future<CompilationResult> runCompiler(
entryPoint = Uri.parse('memory:main.dart');
}
CompilerImpl compiler = compilerFor(
+ entryPoint: entryPoint,
memorySourceFiles: memorySourceFiles,
diagnosticHandler: diagnosticHandler,
outputProvider: outputProvider,
+ disableInlining: disableInlining,
options: options,
cachedCompiler: cachedCompiler,
showDiagnostics: showDiagnostics,
@@ -100,12 +104,14 @@ Future<CompilationResult> runCompiler(
}
CompilerImpl compilerFor(
- {Map<String, String> memorySourceFiles: const <String, String>{},
+ {Uri entryPoint,
+ Map<String, String> memorySourceFiles: const <String, String>{},
CompilerDiagnostics diagnosticHandler,
CompilerOutput outputProvider,
List<String> options: const <String>[],
CompilerImpl cachedCompiler,
bool showDiagnostics: true,
+ bool disableInlining: false,
Uri packageRoot,
Uri packageConfig,
PackagesDiscoveryProvider packagesDiscoveryProvider}) {
@@ -141,12 +147,15 @@ CompilerImpl compilerFor(
provider,
outputProvider,
diagnosticHandler,
- libraryRoot,
- packageRoot,
- options,
- {},
- packageConfig,
- packagesDiscoveryProvider);
+ new CompilerOptions.parse(
+ entryPoint: entryPoint,
+ libraryRoot: libraryRoot,
+ packageRoot: packageRoot,
+ disableInlining: disableInlining,
+ options: options,
+ environment: {},
+ packageConfig: packageConfig,
+ packagesDiscoveryProvider: packagesDiscoveryProvider));
if (cachedCompiler != null) {
compiler.coreLibrary =
@@ -211,7 +220,6 @@ CompilerImpl compilerFor(
cachedCompiler.deferredLoadTask = null;
cachedCompiler.mirrorUsageAnalyzerTask = null;
cachedCompiler.dumpInfoTask = null;
- cachedCompiler.buildId = null;
}
return compiler;
}

Powered by Google App Engine
This is Rietveld 408576698