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

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

Issue 146213004: A64: Synchronize with r16849. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.cc ('k') | src/flags.cc » ('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 // 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #endif 83 #endif
84 84
85 #ifndef FLAG_ALIAS 85 #ifndef FLAG_ALIAS
86 #define FLAG_ALIAS(ftype, ctype, alias, nam) 86 #define FLAG_ALIAS(ftype, ctype, alias, nam)
87 #endif 87 #endif
88 88
89 #ifndef DEFINE_implication 89 #ifndef DEFINE_implication
90 #define DEFINE_implication(whenflag, thenflag) 90 #define DEFINE_implication(whenflag, thenflag)
91 #endif 91 #endif
92 92
93 #define COMMA ,
93 94
94 #ifdef FLAG_MODE_DECLARE 95 #ifdef FLAG_MODE_DECLARE
95 // Structure used to hold a collection of arguments to the JavaScript code. 96 // Structure used to hold a collection of arguments to the JavaScript code.
96 #define JSARGUMENTS_INIT {{}}
97 struct JSArguments { 97 struct JSArguments {
98 public: 98 public:
99 inline int argc() const {
100 return static_cast<int>(storage_[0]);
101 }
102 inline const char** argv() const {
103 return reinterpret_cast<const char**>(storage_[1]);
104 }
105 inline const char*& operator[] (int idx) const { 99 inline const char*& operator[] (int idx) const {
106 return argv()[idx]; 100 return argv[idx];
107 }
108 inline JSArguments& operator=(JSArguments args) {
109 set_argc(args.argc());
110 set_argv(args.argv());
111 return *this;
112 } 101 }
113 static JSArguments Create(int argc, const char** argv) { 102 static JSArguments Create(int argc, const char** argv) {
114 JSArguments args; 103 JSArguments args;
115 args.set_argc(argc); 104 args.argc = argc;
116 args.set_argv(argv); 105 args.argv = argv;
117 return args; 106 return args;
118 } 107 }
119 private: 108 int argc;
120 void set_argc(int argc) { 109 const char** argv;
121 storage_[0] = argc; 110 };
111
112 struct MaybeBoolFlag {
113 static MaybeBoolFlag Create(bool has_value, bool value) {
114 MaybeBoolFlag flag;
115 flag.has_value = has_value;
116 flag.value = value;
117 return flag;
122 } 118 }
123 void set_argv(const char** argv) { 119 bool has_value;
124 storage_[1] = reinterpret_cast<AtomicWord>(argv); 120 bool value;
125 }
126 public:
127 // Contains argc and argv. Unfortunately we have to store these two fields
128 // into a single one to avoid making the initialization macro (which would be
129 // "{ 0, NULL }") contain a coma.
130 AtomicWord storage_[2];
131 }; 121 };
132 #endif 122 #endif
133 123
134 #if (defined CAN_USE_VFP3_INSTRUCTIONS) || !(defined ARM_TEST) 124 #if (defined CAN_USE_VFP3_INSTRUCTIONS) || !(defined ARM_TEST)
135 # define ENABLE_VFP3_DEFAULT true 125 # define ENABLE_VFP3_DEFAULT true
136 #else 126 #else
137 # define ENABLE_VFP3_DEFAULT false 127 # define ENABLE_VFP3_DEFAULT false
138 #endif 128 #endif
139 #if (defined CAN_USE_ARMV7_INSTRUCTIONS) || !(defined ARM_TEST) 129 #if (defined CAN_USE_ARMV7_INSTRUCTIONS) || !(defined ARM_TEST)
140 # define ENABLE_ARMV7_DEFAULT true 130 # define ENABLE_ARMV7_DEFAULT true
141 #else 131 #else
142 # define ENABLE_ARMV7_DEFAULT false 132 # define ENABLE_ARMV7_DEFAULT false
143 #endif 133 #endif
144 #if (defined CAN_USE_VFP32DREGS) || !(defined ARM_TEST) 134 #if (defined CAN_USE_VFP32DREGS) || !(defined ARM_TEST)
145 # define ENABLE_32DREGS_DEFAULT true 135 # define ENABLE_32DREGS_DEFAULT true
146 #else 136 #else
147 # define ENABLE_32DREGS_DEFAULT false 137 # define ENABLE_32DREGS_DEFAULT false
148 #endif 138 #endif
149 139
150 #define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) 140 #define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
141 #define DEFINE_maybe_bool(nam, cmt) FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, \
142 { false COMMA false }, cmt)
151 #define DEFINE_int(nam, def, cmt) FLAG(INT, int, nam, def, cmt) 143 #define DEFINE_int(nam, def, cmt) FLAG(INT, int, nam, def, cmt)
152 #define DEFINE_float(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) 144 #define DEFINE_float(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt)
153 #define DEFINE_string(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) 145 #define DEFINE_string(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt)
154 #define DEFINE_args(nam, def, cmt) FLAG(ARGS, JSArguments, nam, def, cmt) 146 #define DEFINE_args(nam, cmt) FLAG(ARGS, JSArguments, nam, \
147 { 0 COMMA NULL }, cmt)
155 148
156 #define DEFINE_ALIAS_bool(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam) 149 #define DEFINE_ALIAS_bool(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam)
157 #define DEFINE_ALIAS_int(alias, nam) FLAG_ALIAS(INT, int, alias, nam) 150 #define DEFINE_ALIAS_int(alias, nam) FLAG_ALIAS(INT, int, alias, nam)
158 #define DEFINE_ALIAS_float(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam) 151 #define DEFINE_ALIAS_float(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam)
159 #define DEFINE_ALIAS_string(alias, nam) \ 152 #define DEFINE_ALIAS_string(alias, nam) \
160 FLAG_ALIAS(STRING, const char*, alias, nam) 153 FLAG_ALIAS(STRING, const char*, alias, nam)
161 #define DEFINE_ALIAS_args(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam) 154 #define DEFINE_ALIAS_args(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam)
162 155
163 // 156 //
164 // Flags in all modes. 157 // Flags in all modes.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 DEFINE_bool(collect_megamorphic_maps_from_stub_cache, 247 DEFINE_bool(collect_megamorphic_maps_from_stub_cache,
255 true, 248 true,
256 "crankshaft harvests type feedback from stub cache") 249 "crankshaft harvests type feedback from stub cache")
257 DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen") 250 DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen")
258 DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file") 251 DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file")
259 DEFINE_string(trace_hydrogen_filter, "*", "hydrogen tracing filter") 252 DEFINE_string(trace_hydrogen_filter, "*", "hydrogen tracing filter")
260 DEFINE_bool(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs") 253 DEFINE_bool(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs")
261 DEFINE_string(trace_hydrogen_file, NULL, "trace hydrogen to given file name") 254 DEFINE_string(trace_hydrogen_file, NULL, "trace hydrogen to given file name")
262 DEFINE_string(trace_phase, "HLZ", "trace generated IR for specified phases") 255 DEFINE_string(trace_phase, "HLZ", "trace generated IR for specified phases")
263 DEFINE_bool(trace_inlining, false, "trace inlining decisions") 256 DEFINE_bool(trace_inlining, false, "trace inlining decisions")
257 DEFINE_bool(trace_load_elimination, false, "trace load elimination")
264 DEFINE_bool(trace_alloc, false, "trace register allocator") 258 DEFINE_bool(trace_alloc, false, "trace register allocator")
265 DEFINE_bool(trace_all_uses, false, "trace all use positions") 259 DEFINE_bool(trace_all_uses, false, "trace all use positions")
266 DEFINE_bool(trace_range, false, "trace range analysis") 260 DEFINE_bool(trace_range, false, "trace range analysis")
267 DEFINE_bool(trace_gvn, false, "trace global value numbering") 261 DEFINE_bool(trace_gvn, false, "trace global value numbering")
268 DEFINE_bool(trace_representation, false, "trace representation types") 262 DEFINE_bool(trace_representation, false, "trace representation types")
269 DEFINE_bool(trace_escape_analysis, false, "trace hydrogen escape analysis") 263 DEFINE_bool(trace_escape_analysis, false, "trace hydrogen escape analysis")
270 DEFINE_bool(trace_allocation_folding, false, "trace allocation folding") 264 DEFINE_bool(trace_allocation_folding, false, "trace allocation folding")
271 DEFINE_bool(trace_track_allocation_sites, false, 265 DEFINE_bool(trace_track_allocation_sites, false,
272 "trace the tracking of allocation sites") 266 "trace the tracking of allocation sites")
273 DEFINE_bool(trace_migration, false, "trace object migration") 267 DEFINE_bool(trace_migration, false, "trace object migration")
(...skipping 14 matching lines...) Expand all
288 DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining") 282 DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining")
289 DEFINE_bool(use_osr, true, "use on-stack replacement") 283 DEFINE_bool(use_osr, true, "use on-stack replacement")
290 DEFINE_bool(array_bounds_checks_elimination, true, 284 DEFINE_bool(array_bounds_checks_elimination, true,
291 "perform array bounds checks elimination") 285 "perform array bounds checks elimination")
292 DEFINE_bool(array_bounds_checks_hoisting, false, 286 DEFINE_bool(array_bounds_checks_hoisting, false,
293 "perform array bounds checks hoisting") 287 "perform array bounds checks hoisting")
294 DEFINE_bool(array_index_dehoisting, true, 288 DEFINE_bool(array_index_dehoisting, true,
295 "perform array index dehoisting") 289 "perform array index dehoisting")
296 DEFINE_bool(analyze_environment_liveness, true, 290 DEFINE_bool(analyze_environment_liveness, true,
297 "analyze liveness of environment slots and zap dead values") 291 "analyze liveness of environment slots and zap dead values")
292 DEFINE_bool(load_elimination, false, "use load elimination")
298 DEFINE_bool(dead_code_elimination, true, "use dead code elimination") 293 DEFINE_bool(dead_code_elimination, true, "use dead code elimination")
299 DEFINE_bool(fold_constants, true, "use constant folding") 294 DEFINE_bool(fold_constants, true, "use constant folding")
300 DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination") 295 DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination")
301 DEFINE_bool(unreachable_code_elimination, false, 296 DEFINE_bool(unreachable_code_elimination, false,
302 "eliminate unreachable code (hidden behind soft deopts)") 297 "eliminate unreachable code (hidden behind soft deopts)")
303 DEFINE_bool(track_allocation_sites, true, 298 DEFINE_bool(track_allocation_sites, true,
304 "Use allocation site info to reduce transitions") 299 "Use allocation site info to reduce transitions")
305 DEFINE_bool(trace_osr, false, "trace on-stack replacement") 300 DEFINE_bool(trace_osr, false, "trace on-stack replacement")
306 DEFINE_int(stress_runs, 0, "number of stress runs") 301 DEFINE_int(stress_runs, 0, "number of stress runs")
307 DEFINE_bool(optimize_closures, true, "optimize closures") 302 DEFINE_bool(optimize_closures, true, "optimize closures")
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 DEFINE_int(marking_threads, 0, "number of parallel marking threads") 532 DEFINE_int(marking_threads, 0, "number of parallel marking threads")
538 #ifdef VERIFY_HEAP 533 #ifdef VERIFY_HEAP
539 DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC") 534 DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC")
540 #endif 535 #endif
541 536
542 // v8.cc 537 // v8.cc
543 DEFINE_bool(use_idle_notification, true, 538 DEFINE_bool(use_idle_notification, true,
544 "Use idle notification to reduce memory footprint.") 539 "Use idle notification to reduce memory footprint.")
545 // ic.cc 540 // ic.cc
546 DEFINE_bool(use_ic, true, "use inline caching") 541 DEFINE_bool(use_ic, true, "use inline caching")
547 DEFINE_bool(js_accessor_ics, false, "create ics for js accessors")
548 542
549 // macro-assembler-ia32.cc 543 // macro-assembler-ia32.cc
550 DEFINE_bool(native_code_counters, false, 544 DEFINE_bool(native_code_counters, false,
551 "generate extra code for manipulating stats counters") 545 "generate extra code for manipulating stats counters")
552 546
553 // mark-compact.cc 547 // mark-compact.cc
554 DEFINE_bool(always_compact, false, "Perform compaction on every full GC") 548 DEFINE_bool(always_compact, false, "Perform compaction on every full GC")
555 DEFINE_bool(lazy_sweeping, true, 549 DEFINE_bool(lazy_sweeping, true,
556 "Use lazy sweeping for old pointer and data spaces") 550 "Use lazy sweeping for old pointer and data spaces")
557 DEFINE_bool(never_compact, false, 551 DEFINE_bool(never_compact, false,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 DEFINE_bool(preallocate_message_memory, false, 603 DEFINE_bool(preallocate_message_memory, false,
610 "preallocate some memory to build stack traces.") 604 "preallocate some memory to build stack traces.")
611 DEFINE_bool(randomize_hashes, 605 DEFINE_bool(randomize_hashes,
612 true, 606 true,
613 "randomize hashes to avoid predictable hash collisions " 607 "randomize hashes to avoid predictable hash collisions "
614 "(with snapshots this option cannot override the baked-in seed)") 608 "(with snapshots this option cannot override the baked-in seed)")
615 DEFINE_int(hash_seed, 609 DEFINE_int(hash_seed,
616 0, 610 0,
617 "Fixed seed to use to hash property keys (0 means random)" 611 "Fixed seed to use to hash property keys (0 means random)"
618 "(with snapshots this option cannot override the baked-in seed)") 612 "(with snapshots this option cannot override the baked-in seed)")
613 DEFINE_maybe_bool(force_memory_constrained,
614 "force (if true) or prevent (if false) the runtime from treating "
615 "the device as being memory constrained.")
619 616
620 // v8.cc 617 // v8.cc
621 DEFINE_bool(preemption, false, 618 DEFINE_bool(preemption, false,
622 "activate a 100ms timer that switches between V8 threads") 619 "activate a 100ms timer that switches between V8 threads")
623 620
624 // Regexp 621 // Regexp
625 DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") 622 DEFINE_bool(regexp_optimization, true, "generate optimized regexp code")
626 623
627 // Testing flags test/cctest/test-{flags,api,serialization}.cc 624 // Testing flags test/cctest/test-{flags,api,serialization}.cc
628 DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") 625 DEFINE_bool(testing_bool_flag, true, "testing_bool_flag")
626 DEFINE_maybe_bool(testing_maybe_bool_flag, "testing_maybe_bool_flag")
629 DEFINE_int(testing_int_flag, 13, "testing_int_flag") 627 DEFINE_int(testing_int_flag, 13, "testing_int_flag")
630 DEFINE_float(testing_float_flag, 2.5, "float-flag") 628 DEFINE_float(testing_float_flag, 2.5, "float-flag")
631 DEFINE_string(testing_string_flag, "Hello, world!", "string-flag") 629 DEFINE_string(testing_string_flag, "Hello, world!", "string-flag")
632 DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") 630 DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness")
633 #ifdef _WIN32 631 #ifdef _WIN32
634 DEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes", 632 DEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes",
635 "file in which to testing_serialize heap") 633 "file in which to testing_serialize heap")
636 #else 634 #else
637 DEFINE_string(testing_serialization_file, "/tmp/serdes", 635 DEFINE_string(testing_serialization_file, "/tmp/serdes",
638 "file in which to serialize heap") 636 "file in which to serialize heap")
(...skipping 12 matching lines...) Expand all
651 649
652 #ifdef ENABLE_DEBUGGER_SUPPORT 650 #ifdef ENABLE_DEBUGGER_SUPPORT
653 DEFINE_bool(debugger, false, "Enable JavaScript debugger") 651 DEFINE_bool(debugger, false, "Enable JavaScript debugger")
654 DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " 652 DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the "
655 "debugger agent in another process") 653 "debugger agent in another process")
656 DEFINE_bool(debugger_agent, false, "Enable debugger agent") 654 DEFINE_bool(debugger_agent, false, "Enable debugger agent")
657 DEFINE_int(debugger_port, 5858, "Port to use for remote debugging") 655 DEFINE_int(debugger_port, 5858, "Port to use for remote debugging")
658 #endif // ENABLE_DEBUGGER_SUPPORT 656 #endif // ENABLE_DEBUGGER_SUPPORT
659 657
660 DEFINE_string(map_counters, "", "Map counters to a file") 658 DEFINE_string(map_counters, "", "Map counters to a file")
661 DEFINE_args(js_arguments, JSARGUMENTS_INIT, 659 DEFINE_args(js_arguments,
662 "Pass all remaining arguments to the script. Alias for \"--\".") 660 "Pass all remaining arguments to the script. Alias for \"--\".")
663 661
664 #if defined(WEBOS__) 662 #if defined(WEBOS__)
665 DEFINE_bool(debug_compile_events, false, "Enable debugger compile events") 663 DEFINE_bool(debug_compile_events, false, "Enable debugger compile events")
666 DEFINE_bool(debug_script_collected_events, false, 664 DEFINE_bool(debug_script_collected_events, false,
667 "Enable debugger script collected events") 665 "Enable debugger script collected events")
668 #else 666 #else
669 DEFINE_bool(debug_compile_events, true, "Enable debugger compile events") 667 DEFINE_bool(debug_compile_events, true, "Enable debugger compile events")
670 DEFINE_bool(debug_script_collected_events, true, 668 DEFINE_bool(debug_script_collected_events, true,
671 "Enable debugger script collected events") 669 "Enable debugger script collected events")
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 #endif 846 #endif
849 #endif 847 #endif
850 848
851 // Cleanup... 849 // Cleanup...
852 #undef FLAG_FULL 850 #undef FLAG_FULL
853 #undef FLAG_READONLY 851 #undef FLAG_READONLY
854 #undef FLAG 852 #undef FLAG
855 #undef FLAG_ALIAS 853 #undef FLAG_ALIAS
856 854
857 #undef DEFINE_bool 855 #undef DEFINE_bool
856 #undef DEFINE_maybe_bool
858 #undef DEFINE_int 857 #undef DEFINE_int
859 #undef DEFINE_string 858 #undef DEFINE_string
860 #undef DEFINE_float 859 #undef DEFINE_float
861 #undef DEFINE_args 860 #undef DEFINE_args
862 #undef DEFINE_implication 861 #undef DEFINE_implication
863 #undef DEFINE_ALIAS_bool 862 #undef DEFINE_ALIAS_bool
864 #undef DEFINE_ALIAS_int 863 #undef DEFINE_ALIAS_int
865 #undef DEFINE_ALIAS_string 864 #undef DEFINE_ALIAS_string
866 #undef DEFINE_ALIAS_float 865 #undef DEFINE_ALIAS_float
867 #undef DEFINE_ALIAS_args 866 #undef DEFINE_ALIAS_args
868 867
869 #undef FLAG_MODE_DECLARE 868 #undef FLAG_MODE_DECLARE
870 #undef FLAG_MODE_DEFINE 869 #undef FLAG_MODE_DEFINE
871 #undef FLAG_MODE_DEFINE_DEFAULTS 870 #undef FLAG_MODE_DEFINE_DEFAULTS
872 #undef FLAG_MODE_META 871 #undef FLAG_MODE_META
873 #undef FLAG_MODE_DEFINE_IMPLICATIONS 872 #undef FLAG_MODE_DEFINE_IMPLICATIONS
873
874 #undef COMMA
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698