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

Unified Diff: lib/src/compiler/compiler.dart

Issue 1986693003: Provide option to suppress mirrors metadata (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 | « lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/compiler.dart
diff --git a/lib/src/compiler/compiler.dart b/lib/src/compiler/compiler.dart
index 7f0db169609c93e60f713f00b0ddf50d5cac8030..81153ccba8f8572e806be003a276988d49a8804f 100644
--- a/lib/src/compiler/compiler.dart
+++ b/lib/src/compiler/compiler.dart
@@ -150,6 +150,9 @@ class CompilerOptions {
/// This is required for a modular build process.
final bool summarizeApi;
+ /// Whether to preserve metdata only accessible via mirrors
+ final bool preserveAnnotations;
+
/// Whether to force compilation of code with static errors.
final bool unsafeForceCompile;
@@ -181,6 +184,7 @@ class CompilerOptions {
this.sourceMapComment: true,
this.summarizeApi: true,
this.unsafeForceCompile: false,
+ this.preserveAnnotations: false,
this.closure: false,
this.destructureNamedParams: false,
this.moduleFormat: ModuleFormat.legacy});
@@ -190,6 +194,7 @@ class CompilerOptions {
sourceMapComment = args['source-map-comment'],
summarizeApi = args['summarize'],
unsafeForceCompile = args['unsafe-force-compile'],
+ preserveAnnotations = args['preserve-annotations'],
closure = args['closure-experimental'],
destructureNamedParams = args['destructure-named-params'],
moduleFormat = parseModuleFormat(args['modules']);
@@ -210,6 +215,9 @@ class CompilerOptions {
'node': 'node.js modules (https://nodejs.org/api/modules.html)'
},
defaultsTo: 'legacy')
+ ..addFlag('preserve-annotations',
Jennifer Messerly 2016/05/17 21:39:42 maybe "emit-metadata" -- slightly shorter? we als
+ help: 'emit metadata annotations queriable via mirrors',
+ defaultsTo: false)
..addFlag('closure-experimental',
help: 'emit Closure Compiler-friendly code (experimental)',
defaultsTo: false)
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698