OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file defines all of the flags. It is separated into different section, | 5 // This file defines all of the flags. It is separated into different section, |
6 // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the | 6 // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the |
7 // correct section, and use one of the DEFINE_ macros, without a trailing ';'. | 7 // correct section, and use one of the DEFINE_ macros, without a trailing ';'. |
8 // | 8 // |
9 // This include does not have a guard, because it is a template-style include, | 9 // This include does not have a guard, because it is a template-style include, |
10 // which can be included multiple times in different modes. It expects to have | 10 // which can be included multiple times in different modes. It expects to have |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 #else | 119 #else |
120 #define ENABLE_32DREGS_DEFAULT false | 120 #define ENABLE_32DREGS_DEFAULT false |
121 #endif | 121 #endif |
122 #if (defined CAN_USE_NEON) || !(defined ARM_TEST_NO_FEATURE_PROBE) | 122 #if (defined CAN_USE_NEON) || !(defined ARM_TEST_NO_FEATURE_PROBE) |
123 # define ENABLE_NEON_DEFAULT true | 123 # define ENABLE_NEON_DEFAULT true |
124 #else | 124 #else |
125 # define ENABLE_NEON_DEFAULT false | 125 # define ENABLE_NEON_DEFAULT false |
126 #endif | 126 #endif |
127 | 127 |
128 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) | 128 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) |
129 #define DEFINE_BOOL_READONLY(nam, def, cmt) \ | |
130 FLAG_READONLY(BOOL, bool, nam, def, cmt) | |
129 #define DEFINE_MAYBE_BOOL(nam, cmt) \ | 131 #define DEFINE_MAYBE_BOOL(nam, cmt) \ |
130 FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt) | 132 FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt) |
131 #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt) | 133 #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt) |
132 #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) | 134 #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) |
133 #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) | 135 #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) |
134 #define DEFINE_ARGS(nam, cmt) FLAG(ARGS, JSArguments, nam, {0 COMMA NULL}, cmt) | 136 #define DEFINE_ARGS(nam, cmt) FLAG(ARGS, JSArguments, nam, {0 COMMA NULL}, cmt) |
135 | 137 |
136 #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam) | 138 #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam) |
137 #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam) | 139 #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam) |
138 #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam) | 140 #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam) |
139 #define DEFINE_ALIAS_STRING(alias, nam) \ | 141 #define DEFINE_ALIAS_STRING(alias, nam) \ |
140 FLAG_ALIAS(STRING, const char*, alias, nam) | 142 FLAG_ALIAS(STRING, const char*, alias, nam) |
141 #define DEFINE_ALIAS_ARGS(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam) | 143 #define DEFINE_ALIAS_ARGS(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam) |
142 | 144 |
143 // | 145 // |
144 // Flags in all modes. | 146 // Flags in all modes. |
145 // | 147 // |
146 #define FLAG FLAG_FULL | 148 #define FLAG FLAG_FULL |
147 | 149 |
148 // Flags for language modes and experimental language features. | 150 // Flags for language modes and experimental language features. |
149 DEFINE_BOOL(use_strict, false, "enforce strict mode") | 151 DEFINE_BOOL(use_strict, false, "enforce strict mode") |
152 | |
150 DEFINE_BOOL(es_staging, false, "enable upcoming ES6+ features") | 153 DEFINE_BOOL(es_staging, false, "enable upcoming ES6+ features") |
154 DEFINE_BOOL(harmony, false, "enable all harmony features (except proxies)") | |
155 DEFINE_IMPLICATION(harmony, es_staging) | |
151 | 156 |
152 DEFINE_BOOL(harmony_scoping, false, "enable harmony block scoping") | 157 #define HARMONY_FEATURES(V) \ |
153 DEFINE_BOOL(harmony_modules, false, | 158 V(scoping, "harmony block scoping") \ |
rossberg
2014/10/20 13:14:27
I'd prefer not to strip the harmony_ prefix from t
Dmitry Lomov (no reviews)
2014/10/20 13:32:53
Done.
| |
154 "enable harmony modules (implies block scoping)") | 159 V(modules, "harmony modules (implies block scoping)") \ |
155 DEFINE_BOOL(harmony_proxies, false, "enable harmony proxies") | 160 V(strings, "harmony strings") \ |
156 DEFINE_BOOL(harmony_numeric_literals, false, | 161 V(classes, "harmony classes") \ |
157 "enable harmony numeric literals (0o77, 0b11)") | 162 V(object_literals, "harmony object literal extensions") \ |
158 DEFINE_BOOL(harmony_strings, false, "enable harmony string") | 163 V(regexps, "reg-exp related harmony features") \ |
159 DEFINE_BOOL(harmony_arrays, false, "enable harmony arrays") | 164 V(arrow_functions, "harmony arrow functions") |
160 DEFINE_BOOL(harmony_arrow_functions, false, "enable harmony arrow functions") | |
161 DEFINE_BOOL(harmony_classes, false, "enable harmony classes") | |
162 DEFINE_BOOL(harmony_object_literals, false, | |
163 "enable harmony object literal extensions") | |
164 DEFINE_BOOL(harmony_regexps, false, "enable regexp-related harmony features") | |
165 DEFINE_BOOL(harmony, false, "enable all harmony features (except proxies)") | |
166 | 165 |
167 DEFINE_IMPLICATION(harmony, harmony_scoping) | 166 #define STAGED_FEATURES(V) \ |
168 DEFINE_IMPLICATION(harmony, harmony_modules) | 167 V(numeric_literals, "harmony numeric literals (0o77, 0b11)") |
169 // TODO(rossberg): Reenable when problems are sorted out. | 168 |
170 // DEFINE_IMPLICATION(harmony, harmony_proxies) | 169 #define SHIPPING_FEATURES(V) \ |
171 DEFINE_IMPLICATION(harmony, harmony_strings) | 170 V(arrays, "harmony arrays") |
172 DEFINE_IMPLICATION(harmony, harmony_arrays) | 171 |
173 DEFINE_IMPLICATION(harmony, harmony_arrow_functions) | 172 #define FLAG_FEATURES(id, description) \ |
174 DEFINE_IMPLICATION(harmony, harmony_classes) | 173 DEFINE_BOOL(harmony_##id, false, "enable " #description) \ |
175 DEFINE_IMPLICATION(harmony, harmony_object_literals) | 174 DEFINE_IMPLICATION(harmony, harmony_##id) |
176 DEFINE_IMPLICATION(harmony, harmony_regexps) | 175 |
176 HARMONY_FEATURES(FLAG_FEATURES) | |
177 STAGED_FEATURES(FLAG_FEATURES) | |
178 #undef FLAG_FEATURES | |
179 | |
180 #define FLAG_STAGED_FEATURES(id, description) \ | |
181 DEFINE_IMPLICATION(es_staging, harmony_##id) | |
182 | |
183 STAGED_FEATURES(FLAG_STAGED_FEATURES) | |
184 #undef FLAG_STAGED_FEATURES | |
185 | |
186 #define FLAG_SHIPPING_FEATURES(id, description) \ | |
187 DEFINE_BOOL_READONLY(harmony_##id, true, "enable " #description) | |
188 | |
189 SHIPPING_FEATURES(FLAG_SHIPPING_FEATURES) | |
190 #undef FLAG_SHIPPING_FEATURES | |
191 | |
192 // Feature dependencies. | |
177 DEFINE_IMPLICATION(harmony_modules, harmony_scoping) | 193 DEFINE_IMPLICATION(harmony_modules, harmony_scoping) |
178 DEFINE_IMPLICATION(harmony_classes, harmony_scoping) | 194 DEFINE_IMPLICATION(harmony_classes, harmony_scoping) |
179 DEFINE_IMPLICATION(harmony_classes, harmony_object_literals) | 195 DEFINE_IMPLICATION(harmony_classes, harmony_object_literals) |
180 | 196 |
181 DEFINE_IMPLICATION(harmony, es_staging) | 197 DEFINE_BOOL(harmony_proxies, false, "enable harmony proxies") |
182 DEFINE_IMPLICATION(es_staging, harmony_numeric_literals) | 198 // TODO(rossberg): Reenable when problems are sorted out. |
199 // DEFINE_IMPLICATION(harmony, harmony_proxies) | |
200 | |
183 | 201 |
184 // Flags for experimental implementation features. | 202 // Flags for experimental implementation features. |
185 DEFINE_BOOL(compiled_keyed_generic_loads, false, | 203 DEFINE_BOOL(compiled_keyed_generic_loads, false, |
186 "use optimizing compiler to generate keyed generic load stubs") | 204 "use optimizing compiler to generate keyed generic load stubs") |
187 DEFINE_BOOL(clever_optimizations, true, | 205 DEFINE_BOOL(clever_optimizations, true, |
188 "Optimize object size, Array shift, DOM strings and string +") | 206 "Optimize object size, Array shift, DOM strings and string +") |
189 // TODO(hpayer): We will remove this flag as soon as we have pretenuring | 207 // TODO(hpayer): We will remove this flag as soon as we have pretenuring |
190 // support for specific allocation sites. | 208 // support for specific allocation sites. |
191 DEFINE_BOOL(pretenuring_call_new, false, "pretenure call new") | 209 DEFINE_BOOL(pretenuring_call_new, false, "pretenure call new") |
192 DEFINE_BOOL(allocation_site_pretenuring, true, | 210 DEFINE_BOOL(allocation_site_pretenuring, true, |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
931 #undef DEFINE_ALIAS_FLOAT | 949 #undef DEFINE_ALIAS_FLOAT |
932 #undef DEFINE_ALIAS_ARGS | 950 #undef DEFINE_ALIAS_ARGS |
933 | 951 |
934 #undef FLAG_MODE_DECLARE | 952 #undef FLAG_MODE_DECLARE |
935 #undef FLAG_MODE_DEFINE | 953 #undef FLAG_MODE_DEFINE |
936 #undef FLAG_MODE_DEFINE_DEFAULTS | 954 #undef FLAG_MODE_DEFINE_DEFAULTS |
937 #undef FLAG_MODE_META | 955 #undef FLAG_MODE_META |
938 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 956 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
939 | 957 |
940 #undef COMMA | 958 #undef COMMA |
OLD | NEW |