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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.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: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 11826c37fa72fe91ce3ee5ab900866df65b16d59..056345b554da1136dfa5c49c9569878e5db0d346 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -218,7 +218,7 @@ class ModelEmitter {
NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
}
- if (compiler.deferredMapUri != null) {
+ if (compiler.options.deferredMapUri != null) {
writeDeferredMap();
}
@@ -228,7 +228,7 @@ class ModelEmitter {
/// Generates a simple header that provides the compiler's build id.
js.Comment buildGeneratedBy() {
- String flavor = compiler.useContentSecurityPolicy
+ String flavor = compiler.options.useContentSecurityPolicy
? 'fast startup, CSP'
: 'fast startup';
return new js.Comment(generatedBy(compiler, flavor: flavor));
@@ -284,15 +284,15 @@ class ModelEmitter {
monitor: compiler.dumpInfoTask));
if (shouldGenerateSourceMap) {
- mainOutput.add(
- generateSourceMapTag(compiler.sourceMapUri, compiler.outputUri));
+ mainOutput.add(generateSourceMapTag(
+ compiler.options.sourceMapUri, compiler.options.outputUri));
}
mainOutput.close();
if (shouldGenerateSourceMap) {
outputSourceMap(mainOutput, lineColumnCollector, '',
- compiler.sourceMapUri, compiler.outputUri);
+ compiler.options.sourceMapUri, compiler.options.outputUri);
}
}
@@ -348,8 +348,8 @@ class ModelEmitter {
if (shouldGenerateSourceMap) {
Uri mapUri, partUri;
- Uri sourceMapUri = compiler.sourceMapUri;
- Uri outputUri = compiler.outputUri;
+ Uri sourceMapUri = compiler.options.sourceMapUri;
+ Uri outputUri = compiler.options.outputUri;
String partName = "$hunkPrefix.$partExtension";
String hunkFileName = "$hunkPrefix.$deferredExtension";
@@ -357,13 +357,15 @@ class ModelEmitter {
String mapFileName = hunkFileName + ".map";
List<String> mapSegments = sourceMapUri.pathSegments.toList();
mapSegments[mapSegments.length - 1] = mapFileName;
- mapUri = compiler.sourceMapUri.replace(pathSegments: mapSegments);
+ mapUri = compiler.options.sourceMapUri
+ .replace(pathSegments: mapSegments);
}
if (outputUri != null) {
List<String> partSegments = outputUri.pathSegments.toList();
partSegments[partSegments.length - 1] = hunkFileName;
- partUri = compiler.outputUri.replace(pathSegments: partSegments);
+ partUri = compiler.options.outputUri
+ .replace(pathSegments: partSegments);
}
output.add(generateSourceMapTag(mapUri, partUri));
@@ -416,7 +418,8 @@ class ModelEmitter {
mapping["_comment"] = "This mapping shows which compiled `.js` files are "
"needed for a given deferred library import.";
mapping.addAll(compiler.deferredLoadTask.computeDeferredMap());
- compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map')
+ compiler.outputProvider(
+ compiler.options.deferredMapUri.path, 'deferred_map')
..add(const JsonEncoder.withIndent(" ").convert(mapping))
..close();
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698