| Index: src/flag-definitions.h
|
| diff --git a/src/flag-definitions.h b/src/flag-definitions.h
|
| index 23161df90ac3c9f8495b1b99088474f190041e57..33f0f616f663eae365c1722629bacb9cbe2df3b4 100644
|
| --- a/src/flag-definitions.h
|
| +++ b/src/flag-definitions.h
|
| @@ -90,44 +90,34 @@
|
| #define DEFINE_implication(whenflag, thenflag)
|
| #endif
|
|
|
| +#define COMMA ,
|
|
|
| #ifdef FLAG_MODE_DECLARE
|
| // Structure used to hold a collection of arguments to the JavaScript code.
|
| -#define JSARGUMENTS_INIT {{}}
|
| struct JSArguments {
|
| public:
|
| - inline int argc() const {
|
| - return static_cast<int>(storage_[0]);
|
| - }
|
| - inline const char** argv() const {
|
| - return reinterpret_cast<const char**>(storage_[1]);
|
| - }
|
| inline const char*& operator[] (int idx) const {
|
| - return argv()[idx];
|
| - }
|
| - inline JSArguments& operator=(JSArguments args) {
|
| - set_argc(args.argc());
|
| - set_argv(args.argv());
|
| - return *this;
|
| + return argv[idx];
|
| }
|
| static JSArguments Create(int argc, const char** argv) {
|
| JSArguments args;
|
| - args.set_argc(argc);
|
| - args.set_argv(argv);
|
| + args.argc = argc;
|
| + args.argv = argv;
|
| return args;
|
| }
|
| -private:
|
| - void set_argc(int argc) {
|
| - storage_[0] = argc;
|
| - }
|
| - void set_argv(const char** argv) {
|
| - storage_[1] = reinterpret_cast<AtomicWord>(argv);
|
| + int argc;
|
| + const char** argv;
|
| +};
|
| +
|
| +struct MaybeBoolFlag {
|
| + static MaybeBoolFlag Create(bool has_value, bool value) {
|
| + MaybeBoolFlag flag;
|
| + flag.has_value = has_value;
|
| + flag.value = value;
|
| + return flag;
|
| }
|
| -public:
|
| - // Contains argc and argv. Unfortunately we have to store these two fields
|
| - // into a single one to avoid making the initialization macro (which would be
|
| - // "{ 0, NULL }") contain a coma.
|
| - AtomicWord storage_[2];
|
| + bool has_value;
|
| + bool value;
|
| };
|
| #endif
|
|
|
| @@ -148,10 +138,13 @@ public:
|
| #endif
|
|
|
| #define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
|
| +#define DEFINE_maybe_bool(nam, cmt) FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, \
|
| + { false COMMA false }, cmt)
|
| #define DEFINE_int(nam, def, cmt) FLAG(INT, int, nam, def, cmt)
|
| #define DEFINE_float(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt)
|
| #define DEFINE_string(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt)
|
| -#define DEFINE_args(nam, def, cmt) FLAG(ARGS, JSArguments, nam, def, cmt)
|
| +#define DEFINE_args(nam, cmt) FLAG(ARGS, JSArguments, nam, \
|
| + { 0 COMMA NULL }, cmt)
|
|
|
| #define DEFINE_ALIAS_bool(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam)
|
| #define DEFINE_ALIAS_int(alias, nam) FLAG_ALIAS(INT, int, alias, nam)
|
| @@ -261,6 +254,7 @@ DEFINE_bool(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs")
|
| DEFINE_string(trace_hydrogen_file, NULL, "trace hydrogen to given file name")
|
| DEFINE_string(trace_phase, "HLZ", "trace generated IR for specified phases")
|
| DEFINE_bool(trace_inlining, false, "trace inlining decisions")
|
| +DEFINE_bool(trace_load_elimination, false, "trace load elimination")
|
| DEFINE_bool(trace_alloc, false, "trace register allocator")
|
| DEFINE_bool(trace_all_uses, false, "trace all use positions")
|
| DEFINE_bool(trace_range, false, "trace range analysis")
|
| @@ -295,6 +289,7 @@ DEFINE_bool(array_index_dehoisting, true,
|
| "perform array index dehoisting")
|
| DEFINE_bool(analyze_environment_liveness, true,
|
| "analyze liveness of environment slots and zap dead values")
|
| +DEFINE_bool(load_elimination, false, "use load elimination")
|
| DEFINE_bool(dead_code_elimination, true, "use dead code elimination")
|
| DEFINE_bool(fold_constants, true, "use constant folding")
|
| DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination")
|
| @@ -544,7 +539,6 @@ DEFINE_bool(use_idle_notification, true,
|
| "Use idle notification to reduce memory footprint.")
|
| // ic.cc
|
| DEFINE_bool(use_ic, true, "use inline caching")
|
| -DEFINE_bool(js_accessor_ics, false, "create ics for js accessors")
|
|
|
| // macro-assembler-ia32.cc
|
| DEFINE_bool(native_code_counters, false,
|
| @@ -616,6 +610,9 @@ DEFINE_int(hash_seed,
|
| 0,
|
| "Fixed seed to use to hash property keys (0 means random)"
|
| "(with snapshots this option cannot override the baked-in seed)")
|
| +DEFINE_maybe_bool(force_memory_constrained,
|
| + "force (if true) or prevent (if false) the runtime from treating "
|
| + "the device as being memory constrained.")
|
|
|
| // v8.cc
|
| DEFINE_bool(preemption, false,
|
| @@ -626,6 +623,7 @@ DEFINE_bool(regexp_optimization, true, "generate optimized regexp code")
|
|
|
| // Testing flags test/cctest/test-{flags,api,serialization}.cc
|
| DEFINE_bool(testing_bool_flag, true, "testing_bool_flag")
|
| +DEFINE_maybe_bool(testing_maybe_bool_flag, "testing_maybe_bool_flag")
|
| DEFINE_int(testing_int_flag, 13, "testing_int_flag")
|
| DEFINE_float(testing_float_flag, 2.5, "float-flag")
|
| DEFINE_string(testing_string_flag, "Hello, world!", "string-flag")
|
| @@ -658,7 +656,7 @@ DEFINE_int(debugger_port, 5858, "Port to use for remote debugging")
|
| #endif // ENABLE_DEBUGGER_SUPPORT
|
|
|
| DEFINE_string(map_counters, "", "Map counters to a file")
|
| -DEFINE_args(js_arguments, JSARGUMENTS_INIT,
|
| +DEFINE_args(js_arguments,
|
| "Pass all remaining arguments to the script. Alias for \"--\".")
|
|
|
| #if defined(WEBOS__)
|
| @@ -855,6 +853,7 @@ DEFINE_implication(print_all_code, trace_codegen)
|
| #undef FLAG_ALIAS
|
|
|
| #undef DEFINE_bool
|
| +#undef DEFINE_maybe_bool
|
| #undef DEFINE_int
|
| #undef DEFINE_string
|
| #undef DEFINE_float
|
| @@ -871,3 +870,5 @@ DEFINE_implication(print_all_code, trace_codegen)
|
| #undef FLAG_MODE_DEFINE_DEFAULTS
|
| #undef FLAG_MODE_META
|
| #undef FLAG_MODE_DEFINE_IMPLICATIONS
|
| +
|
| +#undef COMMA
|
|
|