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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.src.options; 5 library dart2js.src.options;
6 6
7 import '../compiler.dart' show PackagesDiscoveryProvider; 7 import '../compiler.dart' show PackagesDiscoveryProvider;
8 import 'commandline_options.dart' show Flags; 8 import 'commandline_options.dart' show Flags;
9 9
10 /// Options used for controlling diagnostic messages. 10 /// Options used for controlling diagnostic messages.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 /// Whether to disable global type inference. 123 /// Whether to disable global type inference.
124 final bool disableTypeInference; 124 final bool disableTypeInference;
125 125
126 /// Whether to emit a .json file with a summary of the information used by the 126 /// Whether to emit a .json file with a summary of the information used by the
127 /// compiler during optimization. This includes resolution details, 127 /// compiler during optimization. This includes resolution details,
128 /// dependencies between elements, results of type inference, and the output 128 /// dependencies between elements, results of type inference, and the output
129 /// code for each function. 129 /// code for each function.
130 final bool dumpInfo; 130 final bool dumpInfo;
131 131
132 /// Whether we allow passing an extra argument to `assert`, containing a
133 /// reason for why an assertion fails. (experimental)
134 final bool enableAssertMessage;
135
132 /// Whether the user specified a flag to allow the use of dart:mirrors. This 136 /// Whether the user specified a flag to allow the use of dart:mirrors. This
133 /// silences a warning produced by the compiler. 137 /// silences a warning produced by the compiler.
134 final bool enableExperimentalMirrors; 138 final bool enableExperimentalMirrors;
135 139
136 /// Whether to enable minification 140 /// Whether to enable minification
137 // TODO(sigmund): rename to minify 141 // TODO(sigmund): rename to minify
138 final bool enableMinification; 142 final bool enableMinification;
139 143
140 /// Whether to model which native classes are live based on annotations on the 144 /// Whether to model which native classes are live based on annotations on the
141 /// core libraries. If false, all native classes will be included by default. 145 /// core libraries. If false, all native classes will be included by default.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 String buildId: _UNDETERMINED_BUILD_ID, 325 String buildId: _UNDETERMINED_BUILD_ID,
322 Uri deferredMapUri: null, 326 Uri deferredMapUri: null,
323 bool fatalWarnings: false, 327 bool fatalWarnings: false,
324 bool terseDiagnostics: false, 328 bool terseDiagnostics: false,
325 bool suppressWarnings: false, 329 bool suppressWarnings: false,
326 bool suppressHints: false, 330 bool suppressHints: false,
327 List<String> shownPackageWarnings: null, 331 List<String> shownPackageWarnings: null,
328 bool disableInlining: false, 332 bool disableInlining: false,
329 bool disableTypeInference: false, 333 bool disableTypeInference: false,
330 bool dumpInfo: false, 334 bool dumpInfo: false,
335 bool enableAssertMessage: true,
331 bool enableExperimentalMirrors: false, 336 bool enableExperimentalMirrors: false,
332 bool enableMinification: false, 337 bool enableMinification: false,
333 bool enableNativeLiveTypeAnalysis: true, 338 bool enableNativeLiveTypeAnalysis: true,
334 bool enableTypeAssertions: false, 339 bool enableTypeAssertions: false,
335 bool enableUserAssertions: false, 340 bool enableUserAssertions: false,
336 bool generateCodeWithCompileTimeErrors: false, 341 bool generateCodeWithCompileTimeErrors: false,
337 bool generateSourceMap: true, 342 bool generateSourceMap: true,
338 bool hasIncrementalSupport: false, 343 bool hasIncrementalSupport: false,
339 Uri outputUri: null, 344 Uri outputUri: null,
340 Uri platformConfigUri: null, 345 Uri platformConfigUri: null,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 buildId: buildId, 395 buildId: buildId,
391 deferredMapUri: deferredMapUri, 396 deferredMapUri: deferredMapUri,
392 fatalWarnings: fatalWarnings, 397 fatalWarnings: fatalWarnings,
393 terseDiagnostics: terseDiagnostics, 398 terseDiagnostics: terseDiagnostics,
394 suppressWarnings: suppressWarnings, 399 suppressWarnings: suppressWarnings,
395 suppressHints: suppressHints, 400 suppressHints: suppressHints,
396 shownPackageWarnings: shownPackageWarnings, 401 shownPackageWarnings: shownPackageWarnings,
397 disableInlining: disableInlining || hasIncrementalSupport, 402 disableInlining: disableInlining || hasIncrementalSupport,
398 disableTypeInference: disableTypeInference, 403 disableTypeInference: disableTypeInference,
399 dumpInfo: dumpInfo, 404 dumpInfo: dumpInfo,
405 enableAssertMessage: enableAssertMessage,
400 enableExperimentalMirrors: enableExperimentalMirrors, 406 enableExperimentalMirrors: enableExperimentalMirrors,
401 enableMinification: enableMinification, 407 enableMinification: enableMinification,
402 enableNativeLiveTypeAnalysis: enableNativeLiveTypeAnalysis, 408 enableNativeLiveTypeAnalysis: enableNativeLiveTypeAnalysis,
403 enableTypeAssertions: enableTypeAssertions, 409 enableTypeAssertions: enableTypeAssertions,
404 enableUserAssertions: enableUserAssertions, 410 enableUserAssertions: enableUserAssertions,
405 generateCodeWithCompileTimeErrors: generateCodeWithCompileTimeErrors, 411 generateCodeWithCompileTimeErrors: generateCodeWithCompileTimeErrors,
406 generateSourceMap: generateSourceMap, 412 generateSourceMap: generateSourceMap,
407 hasIncrementalSupport: hasIncrementalSupport, 413 hasIncrementalSupport: hasIncrementalSupport,
408 outputUri: outputUri, 414 outputUri: outputUri,
409 platformConfigUri: platformConfigUri ?? 415 platformConfigUri: platformConfigUri ??
(...skipping 28 matching lines...) Expand all
438 this.buildId: _UNDETERMINED_BUILD_ID, 444 this.buildId: _UNDETERMINED_BUILD_ID,
439 this.deferredMapUri: null, 445 this.deferredMapUri: null,
440 this.fatalWarnings: false, 446 this.fatalWarnings: false,
441 this.terseDiagnostics: false, 447 this.terseDiagnostics: false,
442 this.suppressWarnings: false, 448 this.suppressWarnings: false,
443 this.suppressHints: false, 449 this.suppressHints: false,
444 List<String> shownPackageWarnings: null, 450 List<String> shownPackageWarnings: null,
445 this.disableInlining: false, 451 this.disableInlining: false,
446 this.disableTypeInference: false, 452 this.disableTypeInference: false,
447 this.dumpInfo: false, 453 this.dumpInfo: false,
454 this.enableAssertMessage: true,
448 this.enableExperimentalMirrors: false, 455 this.enableExperimentalMirrors: false,
449 this.enableMinification: false, 456 this.enableMinification: false,
450 this.enableNativeLiveTypeAnalysis: false, 457 this.enableNativeLiveTypeAnalysis: false,
451 this.enableTypeAssertions: false, 458 this.enableTypeAssertions: false,
452 this.enableUserAssertions: false, 459 this.enableUserAssertions: false,
453 this.generateCodeWithCompileTimeErrors: false, 460 this.generateCodeWithCompileTimeErrors: false,
454 this.generateSourceMap: true, 461 this.generateSourceMap: true,
455 this.hasIncrementalSupport: false, 462 this.hasIncrementalSupport: false,
456 this.outputUri: null, 463 this.outputUri: null,
457 this.platformConfigUri: null, 464 this.platformConfigUri: null,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 buildId, 500 buildId,
494 deferredMapUri, 501 deferredMapUri,
495 fatalWarnings, 502 fatalWarnings,
496 terseDiagnostics, 503 terseDiagnostics,
497 suppressWarnings, 504 suppressWarnings,
498 suppressHints, 505 suppressHints,
499 List<String> shownPackageWarnings, 506 List<String> shownPackageWarnings,
500 disableInlining, 507 disableInlining,
501 disableTypeInference, 508 disableTypeInference,
502 dumpInfo, 509 dumpInfo,
510 enableAssertMessage,
503 enableExperimentalMirrors, 511 enableExperimentalMirrors,
504 enableMinification, 512 enableMinification,
505 enableNativeLiveTypeAnalysis, 513 enableNativeLiveTypeAnalysis,
506 enableTypeAssertions, 514 enableTypeAssertions,
507 enableUserAssertions, 515 enableUserAssertions,
508 generateCodeWithCompileTimeErrors, 516 generateCodeWithCompileTimeErrors,
509 generateSourceMap, 517 generateSourceMap,
510 hasIncrementalSupport, 518 hasIncrementalSupport,
511 outputUri, 519 outputUri,
512 platformConfigUri, 520 platformConfigUri,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 fatalWarnings: fatalWarnings ?? options.fatalWarnings, 557 fatalWarnings: fatalWarnings ?? options.fatalWarnings,
550 terseDiagnostics: terseDiagnostics ?? options.terseDiagnostics, 558 terseDiagnostics: terseDiagnostics ?? options.terseDiagnostics,
551 suppressWarnings: suppressWarnings ?? options.suppressWarnings, 559 suppressWarnings: suppressWarnings ?? options.suppressWarnings,
552 suppressHints: suppressHints ?? options.suppressHints, 560 suppressHints: suppressHints ?? options.suppressHints,
553 shownPackageWarnings: 561 shownPackageWarnings:
554 shownPackageWarnings ?? options._shownPackageWarnings, 562 shownPackageWarnings ?? options._shownPackageWarnings,
555 disableInlining: disableInlining ?? options.disableInlining, 563 disableInlining: disableInlining ?? options.disableInlining,
556 disableTypeInference: 564 disableTypeInference:
557 disableTypeInference ?? options.disableTypeInference, 565 disableTypeInference ?? options.disableTypeInference,
558 dumpInfo: dumpInfo ?? options.dumpInfo, 566 dumpInfo: dumpInfo ?? options.dumpInfo,
567 enableAssertMessage: enableAssertMessage ?? options.enableAssertMessage,
559 enableExperimentalMirrors: 568 enableExperimentalMirrors:
560 enableExperimentalMirrors ?? options.enableExperimentalMirrors, 569 enableExperimentalMirrors ?? options.enableExperimentalMirrors,
561 enableMinification: enableMinification ?? options.enableMinification, 570 enableMinification: enableMinification ?? options.enableMinification,
562 enableNativeLiveTypeAnalysis: enableNativeLiveTypeAnalysis ?? 571 enableNativeLiveTypeAnalysis: enableNativeLiveTypeAnalysis ??
563 options.enableNativeLiveTypeAnalysis, 572 options.enableNativeLiveTypeAnalysis,
564 enableTypeAssertions: 573 enableTypeAssertions:
565 enableTypeAssertions ?? options.enableTypeAssertions, 574 enableTypeAssertions ?? options.enableTypeAssertions,
566 enableUserAssertions: 575 enableUserAssertions:
567 enableUserAssertions ?? options.enableUserAssertions, 576 enableUserAssertions ?? options.enableUserAssertions,
568 generateCodeWithCompileTimeErrors: generateCodeWithCompileTimeErrors ?? 577 generateCodeWithCompileTimeErrors: generateCodeWithCompileTimeErrors ??
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 698 }
690 699
691 /// Locations of the platform descriptor files relative to the library root. 700 /// Locations of the platform descriptor files relative to the library root.
692 const String _clientPlatform = "lib/dart_client.platform"; 701 const String _clientPlatform = "lib/dart_client.platform";
693 const String _serverPlatform = "lib/dart_server.platform"; 702 const String _serverPlatform = "lib/dart_server.platform";
694 const String _sharedPlatform = "lib/dart_shared.platform"; 703 const String _sharedPlatform = "lib/dart_shared.platform";
695 704
696 const String _UNDETERMINED_BUILD_ID = "build number could not be determined"; 705 const String _UNDETERMINED_BUILD_ID = "build number could not be determined";
697 const bool _forceIncrementalSupport = 706 const bool _forceIncrementalSupport =
698 const bool.fromEnvironment('DART2JS_EXPERIMENTAL_INCREMENTAL_SUPPORT'); 707 const bool.fromEnvironment('DART2JS_EXPERIMENTAL_INCREMENTAL_SUPPORT');
OLDNEW
« 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