OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false }, | 62 { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false }, |
63 #define FLAG_ALIAS(ftype, ctype, alias, nam) \ | 63 #define FLAG_ALIAS(ftype, ctype, alias, nam) \ |
64 { Flag::TYPE_##ftype, #alias, &FLAG_##nam, &FLAGDEFAULT_##nam, \ | 64 { Flag::TYPE_##ftype, #alias, &FLAG_##nam, &FLAGDEFAULT_##nam, \ |
65 "alias for --"#nam, false }, | 65 "alias for --"#nam, false }, |
66 | 66 |
67 // We produce the code to set flags when it is implied by another flag. | 67 // We produce the code to set flags when it is implied by another flag. |
68 #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS) | 68 #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS) |
69 #define DEFINE_implication(whenflag, thenflag) \ | 69 #define DEFINE_implication(whenflag, thenflag) \ |
70 if (FLAG_##whenflag) FLAG_##thenflag = true; | 70 if (FLAG_##whenflag) FLAG_##thenflag = true; |
71 | 71 |
| 72 #define DEFINE_neg_implication(whenflag, thenflag) \ |
| 73 if (FLAG_##whenflag) FLAG_##thenflag = false; |
| 74 |
72 #else | 75 #else |
73 #error No mode supplied when including flags.defs | 76 #error No mode supplied when including flags.defs |
74 #endif | 77 #endif |
75 | 78 |
76 // Dummy defines for modes where it is not relevant. | 79 // Dummy defines for modes where it is not relevant. |
77 #ifndef FLAG_FULL | 80 #ifndef FLAG_FULL |
78 #define FLAG_FULL(ftype, ctype, nam, def, cmt) | 81 #define FLAG_FULL(ftype, ctype, nam, def, cmt) |
79 #endif | 82 #endif |
80 | 83 |
81 #ifndef FLAG_READONLY | 84 #ifndef FLAG_READONLY |
82 #define FLAG_READONLY(ftype, ctype, nam, def, cmt) | 85 #define FLAG_READONLY(ftype, ctype, nam, def, cmt) |
83 #endif | 86 #endif |
84 | 87 |
85 #ifndef FLAG_ALIAS | 88 #ifndef FLAG_ALIAS |
86 #define FLAG_ALIAS(ftype, ctype, alias, nam) | 89 #define FLAG_ALIAS(ftype, ctype, alias, nam) |
87 #endif | 90 #endif |
88 | 91 |
89 #ifndef DEFINE_implication | 92 #ifndef DEFINE_implication |
90 #define DEFINE_implication(whenflag, thenflag) | 93 #define DEFINE_implication(whenflag, thenflag) |
91 #endif | 94 #endif |
92 | 95 |
| 96 #ifndef DEFINE_neg_implication |
| 97 #define DEFINE_neg_implication(whenflag, thenflag) |
| 98 #endif |
| 99 |
93 #define COMMA , | 100 #define COMMA , |
94 | 101 |
95 #ifdef FLAG_MODE_DECLARE | 102 #ifdef FLAG_MODE_DECLARE |
96 // Structure used to hold a collection of arguments to the JavaScript code. | 103 // Structure used to hold a collection of arguments to the JavaScript code. |
97 struct JSArguments { | 104 struct JSArguments { |
98 public: | 105 public: |
99 inline const char*& operator[] (int idx) const { | 106 inline const char*& operator[] (int idx) const { |
100 return argv[idx]; | 107 return argv[idx]; |
101 } | 108 } |
102 static JSArguments Create(int argc, const char** argv) { | 109 static JSArguments Create(int argc, const char** argv) { |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 #endif | 628 #endif |
622 | 629 |
623 // mksnapshot.cc | 630 // mksnapshot.cc |
624 DEFINE_string(extra_code, NULL, "A filename with extra code to be included in" | 631 DEFINE_string(extra_code, NULL, "A filename with extra code to be included in" |
625 " the snapshot (mksnapshot only)") | 632 " the snapshot (mksnapshot only)") |
626 | 633 |
627 // code-stubs-hydrogen.cc | 634 // code-stubs-hydrogen.cc |
628 DEFINE_bool(profile_hydrogen_code_stub_compilation, false, | 635 DEFINE_bool(profile_hydrogen_code_stub_compilation, false, |
629 "Print the time it takes to lazily compile hydrogen code stubs.") | 636 "Print the time it takes to lazily compile hydrogen code stubs.") |
630 | 637 |
| 638 DEFINE_bool(predictable, false, "enable predictable mode") |
| 639 DEFINE_neg_implication(predictable, randomize_hashes) |
| 640 DEFINE_neg_implication(predictable, concurrent_recompilation) |
| 641 DEFINE_neg_implication(predictable, concurrent_osr) |
| 642 DEFINE_neg_implication(predictable, concurrent_sweeping) |
| 643 DEFINE_neg_implication(predictable, parallel_sweeping) |
| 644 |
| 645 |
631 // | 646 // |
632 // Dev shell flags | 647 // Dev shell flags |
633 // | 648 // |
634 | 649 |
635 DEFINE_bool(help, false, "Print usage message, including flags, on console") | 650 DEFINE_bool(help, false, "Print usage message, including flags, on console") |
636 DEFINE_bool(dump_counters, false, "Dump counters on exit") | 651 DEFINE_bool(dump_counters, false, "Dump counters on exit") |
637 | 652 |
638 #ifdef ENABLE_DEBUGGER_SUPPORT | 653 #ifdef ENABLE_DEBUGGER_SUPPORT |
639 DEFINE_bool(debugger, false, "Enable JavaScript debugger") | 654 DEFINE_bool(debugger, false, "Enable JavaScript debugger") |
640 DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " | 655 DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 #undef FLAG | 883 #undef FLAG |
869 #undef FLAG_ALIAS | 884 #undef FLAG_ALIAS |
870 | 885 |
871 #undef DEFINE_bool | 886 #undef DEFINE_bool |
872 #undef DEFINE_maybe_bool | 887 #undef DEFINE_maybe_bool |
873 #undef DEFINE_int | 888 #undef DEFINE_int |
874 #undef DEFINE_string | 889 #undef DEFINE_string |
875 #undef DEFINE_float | 890 #undef DEFINE_float |
876 #undef DEFINE_args | 891 #undef DEFINE_args |
877 #undef DEFINE_implication | 892 #undef DEFINE_implication |
| 893 #undef DEFINE_neg_implication |
878 #undef DEFINE_ALIAS_bool | 894 #undef DEFINE_ALIAS_bool |
879 #undef DEFINE_ALIAS_int | 895 #undef DEFINE_ALIAS_int |
880 #undef DEFINE_ALIAS_string | 896 #undef DEFINE_ALIAS_string |
881 #undef DEFINE_ALIAS_float | 897 #undef DEFINE_ALIAS_float |
882 #undef DEFINE_ALIAS_args | 898 #undef DEFINE_ALIAS_args |
883 | 899 |
884 #undef FLAG_MODE_DECLARE | 900 #undef FLAG_MODE_DECLARE |
885 #undef FLAG_MODE_DEFINE | 901 #undef FLAG_MODE_DEFINE |
886 #undef FLAG_MODE_DEFINE_DEFAULTS | 902 #undef FLAG_MODE_DEFINE_DEFAULTS |
887 #undef FLAG_MODE_META | 903 #undef FLAG_MODE_META |
888 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 904 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
889 | 905 |
890 #undef COMMA | 906 #undef COMMA |
OLD | NEW |