| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 DEFINE_bool(harmony_scoping, false, "enable harmony block scoping") | 169 DEFINE_bool(harmony_scoping, false, "enable harmony block scoping") |
| 170 DEFINE_bool(harmony_modules, false, | 170 DEFINE_bool(harmony_modules, false, |
| 171 "enable harmony modules (implies block scoping)") | 171 "enable harmony modules (implies block scoping)") |
| 172 DEFINE_bool(harmony_symbols, false, | 172 DEFINE_bool(harmony_symbols, false, |
| 173 "enable harmony symbols (a.k.a. private names)") | 173 "enable harmony symbols (a.k.a. private names)") |
| 174 DEFINE_bool(harmony_proxies, false, "enable harmony proxies") | 174 DEFINE_bool(harmony_proxies, false, "enable harmony proxies") |
| 175 DEFINE_bool(harmony_collections, false, | 175 DEFINE_bool(harmony_collections, false, |
| 176 "enable harmony collections (sets, maps, and weak maps)") | 176 "enable harmony collections (sets, maps, and weak maps)") |
| 177 DEFINE_bool(harmony_observation, false, | 177 DEFINE_bool(harmony_observation, false, |
| 178 "enable harmony object observation (implies harmony collections") | 178 "enable harmony object observation (implies harmony collections") |
| 179 DEFINE_bool(harmony_typed_arrays, true, | |
| 180 "enable harmony typed arrays") | |
| 181 DEFINE_bool(harmony_array_buffer, true, | |
| 182 "enable harmony array buffer") | |
| 183 DEFINE_implication(harmony_typed_arrays, harmony_array_buffer) | |
| 184 DEFINE_bool(harmony_generators, false, "enable harmony generators") | 179 DEFINE_bool(harmony_generators, false, "enable harmony generators") |
| 185 DEFINE_bool(harmony_iteration, false, "enable harmony iteration (for-of)") | 180 DEFINE_bool(harmony_iteration, false, "enable harmony iteration (for-of)") |
| 186 DEFINE_bool(harmony_numeric_literals, false, | 181 DEFINE_bool(harmony_numeric_literals, false, |
| 187 "enable harmony numeric literals (0o77, 0b11)") | 182 "enable harmony numeric literals (0o77, 0b11)") |
| 188 DEFINE_bool(harmony_strings, false, "enable harmony string") | 183 DEFINE_bool(harmony_strings, false, "enable harmony string") |
| 189 DEFINE_bool(harmony_arrays, false, "enable harmony arrays") | 184 DEFINE_bool(harmony_arrays, false, "enable harmony arrays") |
| 190 DEFINE_bool(harmony, false, "enable all harmony features (except typeof)") | 185 DEFINE_bool(harmony, false, "enable all harmony features (except typeof)") |
| 191 DEFINE_implication(harmony, harmony_scoping) | 186 DEFINE_implication(harmony, harmony_scoping) |
| 192 DEFINE_implication(harmony, harmony_modules) | 187 DEFINE_implication(harmony, harmony_modules) |
| 193 DEFINE_implication(harmony, harmony_symbols) | 188 DEFINE_implication(harmony, harmony_symbols) |
| 194 DEFINE_implication(harmony, harmony_proxies) | 189 DEFINE_implication(harmony, harmony_proxies) |
| 195 DEFINE_implication(harmony, harmony_collections) | 190 DEFINE_implication(harmony, harmony_collections) |
| 196 DEFINE_implication(harmony, harmony_observation) | 191 DEFINE_implication(harmony, harmony_observation) |
| 197 DEFINE_implication(harmony, harmony_generators) | 192 DEFINE_implication(harmony, harmony_generators) |
| 198 DEFINE_implication(harmony, harmony_iteration) | 193 DEFINE_implication(harmony, harmony_iteration) |
| 199 DEFINE_implication(harmony, harmony_numeric_literals) | 194 DEFINE_implication(harmony, harmony_numeric_literals) |
| 200 DEFINE_implication(harmony, harmony_strings) | 195 DEFINE_implication(harmony, harmony_strings) |
| 201 DEFINE_implication(harmony, harmony_arrays) | 196 DEFINE_implication(harmony, harmony_arrays) |
| 202 DEFINE_implication(harmony_modules, harmony_scoping) | 197 DEFINE_implication(harmony_modules, harmony_scoping) |
| 203 DEFINE_implication(harmony_observation, harmony_collections) | 198 DEFINE_implication(harmony_observation, harmony_collections) |
| 204 // TODO[dslomov] add harmony => harmony_typed_arrays | |
| 205 | 199 |
| 206 // Flags for experimental implementation features. | 200 // Flags for experimental implementation features. |
| 207 DEFINE_bool(packed_arrays, true, "optimizes arrays that have no holes") | 201 DEFINE_bool(packed_arrays, true, "optimizes arrays that have no holes") |
| 208 DEFINE_bool(smi_only_arrays, true, "tracks arrays with only smi values") | 202 DEFINE_bool(smi_only_arrays, true, "tracks arrays with only smi values") |
| 209 DEFINE_bool(clever_optimizations, | 203 DEFINE_bool(clever_optimizations, |
| 210 true, | 204 true, |
| 211 "Optimize object size, Array shift, DOM strings and string +") | 205 "Optimize object size, Array shift, DOM strings and string +") |
| 212 DEFINE_bool(pretenuring, true, "allocate objects in old space") | 206 DEFINE_bool(pretenuring, true, "allocate objects in old space") |
| 213 // TODO(hpayer): We will remove this flag as soon as we have pretenuring | 207 // TODO(hpayer): We will remove this flag as soon as we have pretenuring |
| 214 // support for specific allocation sites. | 208 // support for specific allocation sites. |
| 215 DEFINE_bool(pretenuring_call_new, false, "pretenure call new") | 209 DEFINE_bool(pretenuring_call_new, false, "pretenure call new") |
| 216 DEFINE_bool(track_fields, true, "track fields with only smi values") | 210 DEFINE_bool(track_fields, true, "track fields with only smi values") |
| 217 DEFINE_bool(track_double_fields, true, "track fields with double values") | 211 DEFINE_bool(track_double_fields, true, "track fields with double values") |
| 218 DEFINE_bool(track_heap_object_fields, true, "track fields with heap values") | 212 DEFINE_bool(track_heap_object_fields, true, "track fields with heap values") |
| 219 DEFINE_bool(track_computed_fields, true, "track computed boilerplate fields") | 213 DEFINE_bool(track_computed_fields, true, "track computed boilerplate fields") |
| 220 DEFINE_implication(track_double_fields, track_fields) | 214 DEFINE_implication(track_double_fields, track_fields) |
| 221 DEFINE_implication(track_heap_object_fields, track_fields) | 215 DEFINE_implication(track_heap_object_fields, track_fields) |
| 222 DEFINE_implication(track_computed_fields, track_fields) | 216 DEFINE_implication(track_computed_fields, track_fields) |
| 223 DEFINE_bool(smi_binop, true, "support smi representation in binary operations") | 217 DEFINE_bool(smi_binop, true, "support smi representation in binary operations") |
| 224 | 218 |
| 219 // Flags for optimization types. |
| 220 DEFINE_bool(optimize_for_size, false, |
| 221 "Enables optimizations which favor memory size over execution " |
| 222 "speed.") |
| 223 |
| 225 // Flags for data representation optimizations | 224 // Flags for data representation optimizations |
| 226 DEFINE_bool(unbox_double_arrays, true, "automatically unbox arrays of doubles") | 225 DEFINE_bool(unbox_double_arrays, true, "automatically unbox arrays of doubles") |
| 227 DEFINE_bool(string_slices, true, "use string slices") | 226 DEFINE_bool(string_slices, true, "use string slices") |
| 228 | 227 |
| 229 // Flags for Crankshaft. | 228 // Flags for Crankshaft. |
| 230 DEFINE_bool(crankshaft, true, "use crankshaft") | 229 DEFINE_bool(crankshaft, true, "use crankshaft") |
| 231 DEFINE_string(hydrogen_filter, "*", "optimization filter") | 230 DEFINE_string(hydrogen_filter, "*", "optimization filter") |
| 232 DEFINE_bool(use_range, true, "use hydrogen range analysis") | 231 DEFINE_bool(use_range, true, "use hydrogen range analysis") |
| 233 DEFINE_bool(use_gvn, true, "use hydrogen global value numbering") | 232 DEFINE_bool(use_gvn, true, "use hydrogen global value numbering") |
| 234 DEFINE_bool(use_canonicalizing, true, "use hydrogen instruction canonicalizing") | 233 DEFINE_bool(use_canonicalizing, true, "use hydrogen instruction canonicalizing") |
| 235 DEFINE_bool(use_inlining, true, "use function inlining") | 234 DEFINE_bool(use_inlining, true, "use function inlining") |
| 236 DEFINE_bool(use_escape_analysis, true, "use hydrogen escape analysis") | 235 DEFINE_bool(use_escape_analysis, false, "use hydrogen escape analysis") |
| 237 DEFINE_bool(use_allocation_folding, true, "use allocation folding") | 236 DEFINE_bool(use_allocation_folding, true, "use allocation folding") |
| 238 DEFINE_int(max_inlining_levels, 5, "maximum number of inlining levels") | 237 DEFINE_int(max_inlining_levels, 5, "maximum number of inlining levels") |
| 239 DEFINE_int(max_inlined_source_size, 600, | 238 DEFINE_int(max_inlined_source_size, 600, |
| 240 "maximum source size in bytes considered for a single inlining") | 239 "maximum source size in bytes considered for a single inlining") |
| 241 DEFINE_int(max_inlined_nodes, 196, | 240 DEFINE_int(max_inlined_nodes, 196, |
| 242 "maximum number of AST nodes considered for a single inlining") | 241 "maximum number of AST nodes considered for a single inlining") |
| 243 DEFINE_int(max_inlined_nodes_cumulative, 400, | 242 DEFINE_int(max_inlined_nodes_cumulative, 400, |
| 244 "maximum cumulative number of AST nodes considered for inlining") | 243 "maximum cumulative number of AST nodes considered for inlining") |
| 245 DEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion") | 244 DEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion") |
| 246 DEFINE_bool(fast_math, true, "faster (but maybe less accurate) math functions") | 245 DEFINE_bool(fast_math, true, "faster (but maybe less accurate) math functions") |
| 247 DEFINE_bool(collect_megamorphic_maps_from_stub_cache, | 246 DEFINE_bool(collect_megamorphic_maps_from_stub_cache, |
| 248 true, | 247 true, |
| 249 "crankshaft harvests type feedback from stub cache") | 248 "crankshaft harvests type feedback from stub cache") |
| 250 DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen") | 249 DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen") |
| 250 DEFINE_bool(trace_check_elimination, false, "trace check elimination phase") |
| 251 DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file") | 251 DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file") |
| 252 DEFINE_string(trace_hydrogen_filter, "*", "hydrogen tracing filter") | 252 DEFINE_string(trace_hydrogen_filter, "*", "hydrogen tracing filter") |
| 253 DEFINE_bool(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs") | 253 DEFINE_bool(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs") |
| 254 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") |
| 255 DEFINE_string(trace_phase, "HLZ", "trace generated IR for specified phases") | 255 DEFINE_string(trace_phase, "HLZ", "trace generated IR for specified phases") |
| 256 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") | 257 DEFINE_bool(trace_load_elimination, false, "trace load elimination") |
| 258 DEFINE_bool(trace_alloc, false, "trace register allocator") | 258 DEFINE_bool(trace_alloc, false, "trace register allocator") |
| 259 DEFINE_bool(trace_all_uses, false, "trace all use positions") | 259 DEFINE_bool(trace_all_uses, false, "trace all use positions") |
| 260 DEFINE_bool(trace_range, false, "trace range analysis") | 260 DEFINE_bool(trace_range, false, "trace range analysis") |
| (...skipping 22 matching lines...) Expand all Loading... |
| 283 DEFINE_bool(use_osr, true, "use on-stack replacement") | 283 DEFINE_bool(use_osr, true, "use on-stack replacement") |
| 284 DEFINE_bool(array_bounds_checks_elimination, true, | 284 DEFINE_bool(array_bounds_checks_elimination, true, |
| 285 "perform array bounds checks elimination") | 285 "perform array bounds checks elimination") |
| 286 DEFINE_bool(array_bounds_checks_hoisting, false, | 286 DEFINE_bool(array_bounds_checks_hoisting, false, |
| 287 "perform array bounds checks hoisting") | 287 "perform array bounds checks hoisting") |
| 288 DEFINE_bool(array_index_dehoisting, true, | 288 DEFINE_bool(array_index_dehoisting, true, |
| 289 "perform array index dehoisting") | 289 "perform array index dehoisting") |
| 290 DEFINE_bool(analyze_environment_liveness, true, | 290 DEFINE_bool(analyze_environment_liveness, true, |
| 291 "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") | 292 DEFINE_bool(load_elimination, false, "use load elimination") |
| 293 DEFINE_bool(check_elimination, false, "use check elimination") |
| 293 DEFINE_bool(dead_code_elimination, true, "use dead code elimination") | 294 DEFINE_bool(dead_code_elimination, true, "use dead code elimination") |
| 294 DEFINE_bool(fold_constants, true, "use constant folding") | 295 DEFINE_bool(fold_constants, true, "use constant folding") |
| 295 DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination") | 296 DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination") |
| 296 DEFINE_bool(unreachable_code_elimination, false, | 297 DEFINE_bool(unreachable_code_elimination, false, |
| 297 "eliminate unreachable code (hidden behind soft deopts)") | 298 "eliminate unreachable code (hidden behind soft deopts)") |
| 298 DEFINE_bool(track_allocation_sites, true, | 299 DEFINE_bool(track_allocation_sites, true, |
| 299 "Use allocation site info to reduce transitions") | 300 "Use allocation site info to reduce transitions") |
| 300 DEFINE_bool(trace_osr, false, "trace on-stack replacement") | 301 DEFINE_bool(trace_osr, false, "trace on-stack replacement") |
| 301 DEFINE_int(stress_runs, 0, "number of stress runs") | 302 DEFINE_int(stress_runs, 0, "number of stress runs") |
| 302 DEFINE_bool(optimize_closures, true, "optimize closures") | 303 DEFINE_bool(optimize_closures, true, "optimize closures") |
| (...skipping 18 matching lines...) Expand all Loading... |
| 321 DEFINE_bool(concurrent_recompilation, true, | 322 DEFINE_bool(concurrent_recompilation, true, |
| 322 "optimizing hot functions asynchronously on a separate thread") | 323 "optimizing hot functions asynchronously on a separate thread") |
| 323 DEFINE_bool(trace_concurrent_recompilation, false, | 324 DEFINE_bool(trace_concurrent_recompilation, false, |
| 324 "track concurrent recompilation") | 325 "track concurrent recompilation") |
| 325 DEFINE_int(concurrent_recompilation_queue_length, 8, | 326 DEFINE_int(concurrent_recompilation_queue_length, 8, |
| 326 "the length of the concurrent compilation queue") | 327 "the length of the concurrent compilation queue") |
| 327 DEFINE_int(concurrent_recompilation_delay, 0, | 328 DEFINE_int(concurrent_recompilation_delay, 0, |
| 328 "artificial compilation delay in ms") | 329 "artificial compilation delay in ms") |
| 329 DEFINE_bool(concurrent_osr, false, | 330 DEFINE_bool(concurrent_osr, false, |
| 330 "concurrent on-stack replacement") | 331 "concurrent on-stack replacement") |
| 332 DEFINE_implication(concurrent_osr, concurrent_recompilation) |
| 331 | 333 |
| 332 DEFINE_bool(omit_map_checks_for_leaf_maps, true, | 334 DEFINE_bool(omit_map_checks_for_leaf_maps, true, |
| 333 "do not emit check maps for constant values that have a leaf map, " | 335 "do not emit check maps for constant values that have a leaf map, " |
| 334 "deoptimize the optimized code if the layout of the maps changes.") | 336 "deoptimize the optimized code if the layout of the maps changes.") |
| 335 | 337 |
| 336 // Experimental profiler changes. | 338 // Experimental profiler changes. |
| 337 DEFINE_bool(experimental_profiler, true, "enable all profiler experiments") | 339 DEFINE_bool(experimental_profiler, true, "enable all profiler experiments") |
| 338 DEFINE_bool(watch_ic_patching, false, "profiler considers IC stability") | 340 DEFINE_bool(watch_ic_patching, false, "profiler considers IC stability") |
| 339 DEFINE_int(frame_count, 1, "number of stack frames inspected by the profiler") | 341 DEFINE_int(frame_count, 1, "number of stack frames inspected by the profiler") |
| 340 DEFINE_bool(self_optimization, false, | 342 DEFINE_bool(self_optimization, false, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 DEFINE_bool(preallocate_message_memory, false, | 605 DEFINE_bool(preallocate_message_memory, false, |
| 604 "preallocate some memory to build stack traces.") | 606 "preallocate some memory to build stack traces.") |
| 605 DEFINE_bool(randomize_hashes, | 607 DEFINE_bool(randomize_hashes, |
| 606 true, | 608 true, |
| 607 "randomize hashes to avoid predictable hash collisions " | 609 "randomize hashes to avoid predictable hash collisions " |
| 608 "(with snapshots this option cannot override the baked-in seed)") | 610 "(with snapshots this option cannot override the baked-in seed)") |
| 609 DEFINE_int(hash_seed, | 611 DEFINE_int(hash_seed, |
| 610 0, | 612 0, |
| 611 "Fixed seed to use to hash property keys (0 means random)" | 613 "Fixed seed to use to hash property keys (0 means random)" |
| 612 "(with snapshots this option cannot override the baked-in seed)") | 614 "(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.") | |
| 616 | 615 |
| 617 // v8.cc | 616 // v8.cc |
| 618 DEFINE_bool(preemption, false, | 617 DEFINE_bool(preemption, false, |
| 619 "activate a 100ms timer that switches between V8 threads") | 618 "activate a 100ms timer that switches between V8 threads") |
| 620 | 619 |
| 621 // Regexp | 620 // Regexp |
| 622 DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") | 621 DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") |
| 623 | 622 |
| 624 // Testing flags test/cctest/test-{flags,api,serialization}.cc | 623 // Testing flags test/cctest/test-{flags,api,serialization}.cc |
| 625 DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") | 624 DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 #undef DEFINE_ALIAS_float | 875 #undef DEFINE_ALIAS_float |
| 877 #undef DEFINE_ALIAS_args | 876 #undef DEFINE_ALIAS_args |
| 878 | 877 |
| 879 #undef FLAG_MODE_DECLARE | 878 #undef FLAG_MODE_DECLARE |
| 880 #undef FLAG_MODE_DEFINE | 879 #undef FLAG_MODE_DEFINE |
| 881 #undef FLAG_MODE_DEFINE_DEFAULTS | 880 #undef FLAG_MODE_DEFINE_DEFAULTS |
| 882 #undef FLAG_MODE_META | 881 #undef FLAG_MODE_META |
| 883 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 882 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
| 884 | 883 |
| 885 #undef COMMA | 884 #undef COMMA |
| OLD | NEW |