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

Side by Side Diff: tools/testing/dart/environment.dart

Issue 2879153005: Add support to dart2js for option --enable-asserts. (Closed)
Patch Set: Added !$checked to section predicate in co19 status file Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/testing/dart/configuration.dart ('k') | tools/testing/dart/options.dart » ('j') | 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'configuration.dart'; 5 import 'configuration.dart';
6 6
7 typedef String _LookUpFunction(Configuration configuration); 7 typedef String _LookUpFunction(Configuration configuration);
8 typedef bool _BoolLookUpFunction(Configuration configuration); 8 typedef bool _BoolLookUpFunction(Configuration configuration);
9 9
10 // TODO(29756): Instead of synthesized negated variables like "unchecked", 10 // TODO(29756): Instead of synthesized negated variables like "unchecked",
11 // consider adding support for "!" to status expressions. 11 // consider adding support for "!" to status expressions.
12 final _variables = { 12 final _variables = {
13 "analyzer": new _Variable.bool((c) => c.compiler == Compiler.dart2analyzer), 13 "analyzer": new _Variable.bool((c) => c.compiler == Compiler.dart2analyzer),
14 "arch": new _Variable((c) => c.architecture.name, Architecture.names), 14 "arch": new _Variable((c) => c.architecture.name, Architecture.names),
15 "browser": new _Variable.bool((c) => c.runtime.isBrowser), 15 "browser": new _Variable.bool((c) => c.runtime.isBrowser),
16 "builder_tag": new _Variable((c) => c.builderTag ?? "", const []), 16 "builder_tag": new _Variable((c) => c.builderTag ?? "", const []),
17 "checked": new _Variable.bool((c) => c.isChecked), 17 "checked": new _Variable.bool((c) => c.isChecked),
18 "compiler": new _Variable((c) => c.compiler.name, Compiler.names), 18 "compiler": new _Variable((c) => c.compiler.name, Compiler.names),
19 "csp": new _Variable.bool((c) => c.isCsp), 19 "csp": new _Variable.bool((c) => c.isCsp),
20 "dart2js_with_kernel": new _Variable.bool((c) => c.useDart2JSWithKernel), 20 "dart2js_with_kernel": new _Variable.bool((c) => c.useDart2JSWithKernel),
21 "fast_startup": new _Variable.bool((c) => c.useFastStartup), 21 "fast_startup": new _Variable.bool((c) => c.useFastStartup),
22 "enable_asserts": new _Variable.bool((c) => c.useEnableAsserts),
22 "host_checked": new _Variable.bool((c) => c.isHostChecked), 23 "host_checked": new _Variable.bool((c) => c.isHostChecked),
23 "host_unchecked": new _Variable.bool((c) => !c.isHostChecked), 24 "host_unchecked": new _Variable.bool((c) => !c.isHostChecked),
24 "hot_reload": new _Variable.bool((c) => c.hotReload), 25 "hot_reload": new _Variable.bool((c) => c.hotReload),
25 "hot_reload_rollback": new _Variable.bool((c) => c.hotReloadRollback), 26 "hot_reload_rollback": new _Variable.bool((c) => c.hotReloadRollback),
26 "ie": new _Variable.bool((c) => c.runtime.isIE), 27 "ie": new _Variable.bool((c) => c.runtime.isIE),
27 "jscl": new _Variable.bool((c) => c.runtime.isJSCommandLine), 28 "jscl": new _Variable.bool((c) => c.runtime.isJSCommandLine),
28 "minified": new _Variable.bool((c) => c.isMinified), 29 "minified": new _Variable.bool((c) => c.isMinified),
29 "mode": new _Variable((c) => c.mode.name, Mode.names), 30 "mode": new _Variable((c) => c.mode.name, Mode.names),
30 "runtime": new _Variable(_runtimeName, Runtime.names), 31 "runtime": new _Variable(_runtimeName, Runtime.names),
31 "strong": new _Variable.bool((c) => c.isStrong), 32 "strong": new _Variable.bool((c) => c.isStrong),
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 _Variable(this._lookUp, Iterable<String> allowed) 105 _Variable(this._lookUp, Iterable<String> allowed)
105 : allowedValues = allowed.toList(); 106 : allowedValues = allowed.toList();
106 107
107 /// Creates a Boolean variable with allowed values "true" and "false". 108 /// Creates a Boolean variable with allowed values "true" and "false".
108 _Variable.bool(_BoolLookUpFunction lookUp) 109 _Variable.bool(_BoolLookUpFunction lookUp)
109 : _lookUp = ((configuration) => lookUp(configuration).toString()), 110 : _lookUp = ((configuration) => lookUp(configuration).toString()),
110 allowedValues = const ["true", "false"]; 111 allowedValues = const ["true", "false"];
111 112
112 String lookUp(Configuration configuration) => _lookUp(configuration); 113 String lookUp(Configuration configuration) => _lookUp(configuration);
113 } 114 }
OLDNEW
« no previous file with comments | « tools/testing/dart/configuration.dart ('k') | tools/testing/dart/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698