| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // Flags in all modes. | 151 // Flags in all modes. |
| 152 // | 152 // |
| 153 #define FLAG FLAG_FULL | 153 #define FLAG FLAG_FULL |
| 154 | 154 |
| 155 // Flags for language modes and experimental language features. | 155 // Flags for language modes and experimental language features. |
| 156 DEFINE_BOOL(use_strict, false, "enforce strict mode") | 156 DEFINE_BOOL(use_strict, false, "enforce strict mode") |
| 157 | 157 |
| 158 DEFINE_BOOL(es_staging, false, "enable all completed harmony features") | 158 DEFINE_BOOL(es_staging, false, "enable all completed harmony features") |
| 159 DEFINE_BOOL(harmony, false, "enable all completed harmony features") | 159 DEFINE_BOOL(harmony, false, "enable all completed harmony features") |
| 160 DEFINE_IMPLICATION(harmony, es_staging) | 160 DEFINE_IMPLICATION(harmony, es_staging) |
| 161 // TODO(rossberg): activate once we have staged scoping: | 161 DEFINE_IMPLICATION(es_staging, harmony) |
| 162 // DEFINE_IMPLICATION(es_staging, harmony) | |
| 163 | 162 |
| 164 // Features that are still work in progress (behind individual flags). | 163 // Features that are still work in progress (behind individual flags). |
| 165 #define HARMONY_INPROGRESS(V) \ | 164 #define HARMONY_INPROGRESS(V) \ |
| 166 V(harmony_scoping, "harmony block scoping") \ | |
| 167 V(harmony_modules, "harmony modules (implies block scoping)") \ | 165 V(harmony_modules, "harmony modules (implies block scoping)") \ |
| 168 V(harmony_arrays, "harmony array methods") \ | 166 V(harmony_arrays, "harmony array methods") \ |
| 169 V(harmony_classes, \ | 167 V(harmony_classes, \ |
| 170 "harmony classes (implies block scoping & object literal extension)") \ | 168 "harmony classes (implies block scoping & object literal extension)") \ |
| 171 V(harmony_object_literals, "harmony object literal extensions") \ | 169 V(harmony_object_literals, "harmony object literal extensions") \ |
| 172 V(harmony_regexps, "harmony regular expression extensions") \ | 170 V(harmony_regexps, "harmony regular expression extensions") \ |
| 173 V(harmony_arrow_functions, "harmony arrow functions") \ | 171 V(harmony_arrow_functions, "harmony arrow functions") \ |
| 174 V(harmony_tostring, "harmony toString") \ | 172 V(harmony_tostring, "harmony toString") \ |
| 175 V(harmony_proxies, "harmony proxies") \ | 173 V(harmony_proxies, "harmony proxies") \ |
| 176 V(harmony_templates, "harmony template literals") \ | 174 V(harmony_templates, "harmony template literals") \ |
| 177 V(harmony_sloppy, "harmony features in sloppy mode") | 175 V(harmony_sloppy, "harmony features in sloppy mode") |
| 178 | 176 |
| 179 // Features that are complete (but still behind --harmony/es-staging flag). | 177 // Features that are complete (but still behind --harmony/es-staging flag). |
| 180 #define HARMONY_STAGED(V) V(harmony_strings, "harmony string methods") | 178 #define HARMONY_STAGED(V) \ |
| 179 V(harmony_strings, "harmony string methods") \ |
| 180 V(harmony_scoping, "harmony block scoping") |
| 181 | 181 |
| 182 // Features that are shipping (turned on by default, but internal flag remains). | 182 // Features that are shipping (turned on by default, but internal flag remains). |
| 183 #define HARMONY_SHIPPING(V) \ | 183 #define HARMONY_SHIPPING(V) \ |
| 184 V(harmony_numeric_literals, "harmony numeric literals") | 184 V(harmony_numeric_literals, "harmony numeric literals") |
| 185 | 185 |
| 186 // Once a shipping feature has proved stable in the wild, it will be dropped | 186 // Once a shipping feature has proved stable in the wild, it will be dropped |
| 187 // from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed, | 187 // from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed, |
| 188 // and associated tests are moved from the harmony directory to the appropriate | 188 // and associated tests are moved from the harmony directory to the appropriate |
| 189 // esN directory. | 189 // esN directory. |
| 190 | 190 |
| 191 | 191 |
| 192 #define FLAG_INPROGRESS_FEATURES(id, description) \ | 192 #define FLAG_INPROGRESS_FEATURES(id, description) \ |
| 193 DEFINE_BOOL(id, false, "enable " #description " (in progress)") | 193 DEFINE_BOOL(id, false, "enable " #description " (in progress)") |
| 194 HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES) | 194 HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES) |
| 195 #undef FLAG_INPROGRESS_FEATURES | 195 #undef FLAG_INPROGRESS_FEATURES |
| 196 | 196 |
| 197 // TODO(rossberg): temporary, remove once we have staged scoping. | |
| 198 // After that, --harmony will be synonymous to --es-staging. | |
| 199 DEFINE_IMPLICATION(harmony, harmony_scoping) | |
| 200 | |
| 201 #define FLAG_STAGED_FEATURES(id, description) \ | 197 #define FLAG_STAGED_FEATURES(id, description) \ |
| 202 DEFINE_BOOL(id, false, "enable " #description) \ | 198 DEFINE_BOOL(id, false, "enable " #description) \ |
| 203 DEFINE_IMPLICATION(es_staging, id) | 199 DEFINE_IMPLICATION(es_staging, id) |
| 204 HARMONY_STAGED(FLAG_STAGED_FEATURES) | 200 HARMONY_STAGED(FLAG_STAGED_FEATURES) |
| 205 #undef FLAG_STAGED_FEATURES | 201 #undef FLAG_STAGED_FEATURES |
| 206 | 202 |
| 207 #define FLAG_SHIPPING_FEATURES(id, description) \ | 203 #define FLAG_SHIPPING_FEATURES(id, description) \ |
| 208 DEFINE_BOOL_READONLY(id, true, "enable " #description) | 204 DEFINE_BOOL_READONLY(id, true, "enable " #description) |
| 209 HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) | 205 HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) |
| 210 #undef FLAG_SHIPPING_FEATURES | 206 #undef FLAG_SHIPPING_FEATURES |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 #undef DEFINE_ALIAS_FLOAT | 984 #undef DEFINE_ALIAS_FLOAT |
| 989 #undef DEFINE_ALIAS_ARGS | 985 #undef DEFINE_ALIAS_ARGS |
| 990 | 986 |
| 991 #undef FLAG_MODE_DECLARE | 987 #undef FLAG_MODE_DECLARE |
| 992 #undef FLAG_MODE_DEFINE | 988 #undef FLAG_MODE_DEFINE |
| 993 #undef FLAG_MODE_DEFINE_DEFAULTS | 989 #undef FLAG_MODE_DEFINE_DEFAULTS |
| 994 #undef FLAG_MODE_META | 990 #undef FLAG_MODE_META |
| 995 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 991 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
| 996 | 992 |
| 997 #undef COMMA | 993 #undef COMMA |
| OLD | NEW |