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

Side by Side Diff: src/flag-definitions.h

Issue 2356713002: Version 5.5.228.1 (cherry-pick) (Closed)
Patch Set: Created 4 years, 3 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 | « src/factory.h ('k') | src/globals.h » ('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 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
11 // a mode defined before it's included. The modes are FLAG_MODE_... below: 11 // a mode defined before it's included. The modes are FLAG_MODE_... below:
12 12
13 #define DEFINE_IMPLICATION(whenflag, thenflag) \ 13 #define DEFINE_IMPLICATION(whenflag, thenflag) \
14 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, true) 14 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, true)
15 15
16 #define DEFINE_NEG_IMPLICATION(whenflag, thenflag) \ 16 #define DEFINE_NEG_IMPLICATION(whenflag, thenflag) \
17 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false) 17 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false)
18 18
19 #define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag) \ 19 #define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag) \
20 DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, false) 20 DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, false)
21 21
22 // We want to declare the names of the variables for the header file. Normally 22 // We want to declare the names of the variables for the header file. Normally
23 // this will just be an extern declaration, but for a readonly flag we let the 23 // this will just be an extern declaration, but for a readonly flag we let the
24 // compiler make better optimizations by giving it the value. 24 // compiler make better optimizations by giving it the value.
25 #if defined(FLAG_MODE_DECLARE) 25 #if defined(FLAG_MODE_DECLARE)
26 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 26 #define FLAG_FULL(ftype, ctype, nam, def, cmt) extern ctype FLAG_##nam;
27 V8_EXPORT_PRIVATE extern ctype FLAG_##nam;
28 #define FLAG_READONLY(ftype, ctype, nam, def, cmt) \ 27 #define FLAG_READONLY(ftype, ctype, nam, def, cmt) \
29 static ctype const FLAG_##nam = def; 28 static ctype const FLAG_##nam = def;
30 29
31 // We want to supply the actual storage and value for the flag variable in the 30 // We want to supply the actual storage and value for the flag variable in the
32 // .cc file. We only do this for writable flags. 31 // .cc file. We only do this for writable flags.
33 #elif defined(FLAG_MODE_DEFINE) 32 #elif defined(FLAG_MODE_DEFINE)
34 #ifdef USING_V8_SHARED 33 #define FLAG_FULL(ftype, ctype, nam, def, cmt) ctype FLAG_##nam = def;
35 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \
36 V8_EXPORT_PRIVATE extern ctype FLAG_##nam;
37 #else
38 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \
39 V8_EXPORT_PRIVATE ctype FLAG_##nam = def;
40 #endif
41 34
42 // We need to define all of our default values so that the Flag structure can 35 // We need to define all of our default values so that the Flag structure can
43 // access them by pointer. These are just used internally inside of one .cc, 36 // access them by pointer. These are just used internally inside of one .cc,
44 // for MODE_META, so there is no impact on the flags interface. 37 // for MODE_META, so there is no impact on the flags interface.
45 #elif defined(FLAG_MODE_DEFINE_DEFAULTS) 38 #elif defined(FLAG_MODE_DEFINE_DEFAULTS)
46 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 39 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \
47 static ctype const FLAGDEFAULT_##nam = def; 40 static ctype const FLAGDEFAULT_##nam = def;
48 41
49 // We want to write entries into our meta data table, for internal parsing and 42 // We want to write entries into our meta data table, for internal parsing and
50 // printing / etc in the flag parser code. We only do this for writable flags. 43 // printing / etc in the flag parser code. We only do this for writable flags.
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 #undef DEFINE_ALIAS_FLOAT 1202 #undef DEFINE_ALIAS_FLOAT
1210 #undef DEFINE_ALIAS_ARGS 1203 #undef DEFINE_ALIAS_ARGS
1211 1204
1212 #undef FLAG_MODE_DECLARE 1205 #undef FLAG_MODE_DECLARE
1213 #undef FLAG_MODE_DEFINE 1206 #undef FLAG_MODE_DEFINE
1214 #undef FLAG_MODE_DEFINE_DEFAULTS 1207 #undef FLAG_MODE_DEFINE_DEFAULTS
1215 #undef FLAG_MODE_META 1208 #undef FLAG_MODE_META
1216 #undef FLAG_MODE_DEFINE_IMPLICATIONS 1209 #undef FLAG_MODE_DEFINE_IMPLICATIONS
1217 1210
1218 #undef COMMA 1211 #undef COMMA
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698