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

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

Issue 2579523003: add --assert-message flag back (Closed)
Patch Set: git cl land Created 4 years 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 | « pkg/compiler/lib/src/dart2js.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/options.dart
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index 777f4b00d9300ca82b1d8c146621af9e9c33b3c7..1c257dfba9867d8f32a0849e9887064262c5ee35 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -129,6 +129,10 @@ class CompilerOptions implements DiagnosticOptions {
/// code for each function.
final bool dumpInfo;
+ /// Whether we allow passing an extra argument to `assert`, containing a
+ /// reason for why an assertion fails. (experimental)
+ final bool enableAssertMessage;
+
/// Whether the user specified a flag to allow the use of dart:mirrors. This
/// silences a warning produced by the compiler.
final bool enableExperimentalMirrors;
@@ -328,6 +332,7 @@ class CompilerOptions implements DiagnosticOptions {
bool disableInlining: false,
bool disableTypeInference: false,
bool dumpInfo: false,
+ bool enableAssertMessage: true,
bool enableExperimentalMirrors: false,
bool enableMinification: false,
bool enableNativeLiveTypeAnalysis: true,
@@ -397,6 +402,7 @@ class CompilerOptions implements DiagnosticOptions {
disableInlining: disableInlining || hasIncrementalSupport,
disableTypeInference: disableTypeInference,
dumpInfo: dumpInfo,
+ enableAssertMessage: enableAssertMessage,
enableExperimentalMirrors: enableExperimentalMirrors,
enableMinification: enableMinification,
enableNativeLiveTypeAnalysis: enableNativeLiveTypeAnalysis,
@@ -445,6 +451,7 @@ class CompilerOptions implements DiagnosticOptions {
this.disableInlining: false,
this.disableTypeInference: false,
this.dumpInfo: false,
+ this.enableAssertMessage: true,
this.enableExperimentalMirrors: false,
this.enableMinification: false,
this.enableNativeLiveTypeAnalysis: false,
@@ -500,6 +507,7 @@ class CompilerOptions implements DiagnosticOptions {
disableInlining,
disableTypeInference,
dumpInfo,
+ enableAssertMessage,
enableExperimentalMirrors,
enableMinification,
enableNativeLiveTypeAnalysis,
@@ -556,6 +564,7 @@ class CompilerOptions implements DiagnosticOptions {
disableTypeInference:
disableTypeInference ?? options.disableTypeInference,
dumpInfo: dumpInfo ?? options.dumpInfo,
+ enableAssertMessage: enableAssertMessage ?? options.enableAssertMessage,
enableExperimentalMirrors:
enableExperimentalMirrors ?? options.enableExperimentalMirrors,
enableMinification: enableMinification ?? options.enableMinification,
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698