blob: 021362dea5ed3ca09997356519aed0ab32189f5e [file] [log] [blame]
kasperl@chromium.orgb9123622008-09-17 14:05:56 +00001// Copyright 2008 the V8 project authors. All rights reserved.
2// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above
9// copyright notice, this list of conditions and the following
10// disclaimer in the documentation and/or other materials provided
11// with the distribution.
12// * Neither the name of Google Inc. nor the names of its
13// contributors may be used to endorse or promote products derived
14// from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28// This file defines all of the flags. It is separated into different section,
29// for Debug, Release, Logging and Profiling, etc. To add a new flag, find the
30// correct section, and use one of the DEFINE_ macros, without a trailing ';'.
31//
32// This include does not have a guard, because it is a template-style include,
33// which can be included multiple times in different modes. It expects to have
34// a mode defined before it's included. The modes are FLAG_MODE_... below:
35
36// We want to declare the names of the variables for the header file. Normally
37// this will just be an extern declaration, but for a readonly flag we let the
38// compiler make better optimizations by giving it the value.
39#if defined(FLAG_MODE_DECLARE)
40#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
41 extern ctype FLAG_##nam;
42#define FLAG_READONLY(ftype, ctype, nam, def, cmt) \
43 static ctype const FLAG_##nam = def;
44
45// We want to supply the actual storage and value for the flag variable in the
46// .cc file. We only do this for writable flags.
47#elif defined(FLAG_MODE_DEFINE)
48#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
49 ctype FLAG_##nam = def;
50#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
51
52// We need to define all of our default values so that the Flag structure can
53// access them by pointer. These are just used internally inside of one .cc,
54// for MODE_META, so there is no impact on the flags interface.
55#elif defined(FLAG_MODE_DEFINE_DEFAULTS)
56#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
57 static ctype const FLAGDEFAULT_##nam = def;
58#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
59
60
61// We want to write entries into our meta data table, for internal parsing and
62// printing / etc in the flag parser code. We only do this for writable flags.
63#elif defined(FLAG_MODE_META)
64#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
ager@chromium.org41826e72009-03-30 13:30:57 +000065 { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false },
kasperl@chromium.orgb9123622008-09-17 14:05:56 +000066#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
67
68#else
69#error No mode supplied when including flags.defs
70#endif
71
ager@chromium.org3bf7b912008-11-17 09:09:45 +000072#ifdef FLAG_MODE_DECLARE
73// Structure used to hold a collection of arguments to the JavaScript code.
74struct JSArguments {
75public:
76 JSArguments();
77 JSArguments(int argc, const char** argv);
78 int argc() const;
79 const char** argv();
80 const char*& operator[](int idx);
81 JSArguments& operator=(JSArguments args);
82private:
83 int argc_;
84 const char** argv_;
85};
86#endif
87
kasperl@chromium.orgb9123622008-09-17 14:05:56 +000088#define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
89#define DEFINE_int(nam, def, cmt) FLAG(INT, int, nam, def, cmt)
90#define DEFINE_float(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt)
91#define DEFINE_string(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt)
ager@chromium.org3bf7b912008-11-17 09:09:45 +000092#define DEFINE_args(nam, def, cmt) FLAG(ARGS, JSArguments, nam, def, cmt)
kasperl@chromium.orgb9123622008-09-17 14:05:56 +000093
94//
95// Flags in all modes.
96//
97#define FLAG FLAG_FULL
98
christian.plesner.hansen@gmail.com9d58c2b2009-10-16 11:48:38 +000099// assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000100DEFINE_bool(debug_code, false,
101 "generate extra code (comments, assertions) for debugging")
102DEFINE_bool(emit_branch_hints, false, "emit branch hints")
103DEFINE_bool(push_pop_elimination, true,
104 "eliminate redundant push/pops in assembly code")
105DEFINE_bool(print_push_pop_elimination, false,
106 "print elimination of redundant push/pops in assembly code")
christian.plesner.hansen@gmail.com9d58c2b2009-10-16 11:48:38 +0000107DEFINE_bool(enable_sse2, true,
108 "enable use of SSE2 instructions if available")
109DEFINE_bool(enable_sse3, true,
110 "enable use of SSE3 instructions if available")
111DEFINE_bool(enable_cmov, true,
112 "enable use of CMOV instruction if available")
113DEFINE_bool(enable_rdtsc, true,
114 "enable use of RDTSC instruction if available")
115DEFINE_bool(enable_sahf, true,
116 "enable use of SAHF instruction if available (X64 only)")
ager@chromium.orgc4c92722009-11-18 14:12:51 +0000117DEFINE_bool(enable_vfp3, true,
118 "enable use of VFP3 instructions if available (ARM only)")
ager@chromium.org5c838252010-02-19 08:53:10 +0000119DEFINE_bool(enable_armv7, true,
120 "enable use of ARMv7 instructions if available (ARM only)")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000121
122// bootstrapper.cc
123DEFINE_string(expose_natives_as, NULL, "expose natives in global object")
124DEFINE_string(expose_debug_as, NULL, "expose debug in global object")
125DEFINE_string(natives_file, NULL, "alternative natives file")
126DEFINE_bool(expose_gc, false, "expose gc extension")
kasperl@chromium.org86f77b72009-07-06 08:21:57 +0000127DEFINE_int(stack_trace_limit, 10, "number of stack frames to capture")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000128
129// builtins-ia32.cc
130DEFINE_bool(inline_new, true, "use fast inline allocation")
131
132// checks.cc
133DEFINE_bool(stack_trace_on_abort, true,
134 "print a stack trace if an assertion failure occurs")
135
136// codegen-ia32.cc / codegen-arm.cc
137DEFINE_bool(trace, false, "trace function calls")
138DEFINE_bool(defer_negation, true, "defer negation operation")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000139
140// codegen.cc
141DEFINE_bool(lazy, true, "use lazy compilation")
142DEFINE_bool(debug_info, true, "add debug information to compiled functions")
143
144// compiler.cc
145DEFINE_bool(strict, false, "strict error checking")
146DEFINE_int(min_preparse_length, 1024,
christian.plesner.hansen@gmail.com9d58c2b2009-10-16 11:48:38 +0000147 "minimum length for automatic enable preparsing")
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000148DEFINE_bool(full_compiler, true, "enable dedicated backend for run-once code")
149DEFINE_bool(fast_compiler, false, "enable speculative optimizing backend")
150DEFINE_bool(always_full_compiler, false,
151 "try to use the dedicated run-once backend for all code")
sgjesse@chromium.orgac6aa172009-12-04 12:29:05 +0000152DEFINE_bool(always_fast_compiler, false,
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000153 "try to use the speculative optimizing backend for all code")
154DEFINE_bool(trace_bailout, false,
155 "print reasons for falling back to using the classic V8 backend")
fschneider@chromium.org086aac62010-03-17 13:18:24 +0000156DEFINE_bool(safe_int32_compiler, true,
ager@chromium.orgce5e87b2010-03-10 10:24:18 +0000157 "enable optimized side-effect-free int32 expressions.")
158DEFINE_bool(use_flow_graph, false, "perform flow-graph based optimizations")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000159
kasperl@chromium.org71affb52009-05-26 05:44:31 +0000160// compilation-cache.cc
161DEFINE_bool(compilation_cache, true, "enable compilation cache")
162
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000163// debug.cc
164DEFINE_bool(remote_debugging, false, "enable remote debugging")
165DEFINE_bool(trace_debug_json, false, "trace debugging JSON request/response")
sgjesse@chromium.orgac6aa172009-12-04 12:29:05 +0000166DEFINE_bool(debugger_auto_break, true,
ager@chromium.orgbb29dc92009-03-24 13:25:23 +0000167 "automatically set the debug break flag when debugger commands are "
sgjesse@chromium.orgac6aa172009-12-04 12:29:05 +0000168 "in the queue")
ager@chromium.orgce5e87b2010-03-10 10:24:18 +0000169DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000170
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000171// frames.cc
172DEFINE_int(max_stack_trace_source_length, 300,
173 "maximum length of function source code printed in a stack trace.")
174
175// heap.cc
ager@chromium.org3811b432009-10-28 14:53:37 +0000176DEFINE_int(max_new_space_size, 0, "max size of the new generation")
177DEFINE_int(max_old_space_size, 0, "max size of the old generation")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000178DEFINE_bool(gc_global, false, "always perform global GCs")
179DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations")
180DEFINE_bool(trace_gc, false,
181 "print one trace line following each garbage collection")
kasperl@chromium.orge959c182009-07-27 08:59:04 +0000182DEFINE_bool(trace_gc_verbose, false,
183 "print more details following each garbage collection")
kasperl@chromium.org7be3c992009-03-12 07:19:55 +0000184DEFINE_bool(collect_maps, true,
kasperl@chromium.org9bbf9682008-10-30 11:53:07 +0000185 "garbage collect maps from which no objects can be reached")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000186
ager@chromium.orgadd848f2009-08-13 12:44:13 +0000187// v8.cc
188DEFINE_bool(use_idle_notification, true,
189 "Use idle notification to reduce memory footprint.")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000190// ic.cc
191DEFINE_bool(use_ic, true, "use inline caching")
192
193// macro-assembler-ia32.cc
194DEFINE_bool(native_code_counters, false,
195 "generate extra code for manipulating stats counters")
196
197// mark-compact.cc
198DEFINE_bool(always_compact, false, "Perform compaction on every full GC")
199DEFINE_bool(never_compact, false,
200 "Never perform compaction on full GC - testing only")
201DEFINE_bool(cleanup_ics_at_gc, true,
202 "Flush inline caches prior to mark compact collection.")
203DEFINE_bool(cleanup_caches_in_maps_at_gc, true,
204 "Flush code caches in maps during mark compact cycle.")
205
ager@chromium.org236ad962008-09-25 09:45:57 +0000206DEFINE_bool(canonicalize_object_literal_maps, true,
207 "Canonicalize maps for object literals.")
208
fschneider@chromium.org0c20e672010-01-14 15:28:53 +0000209DEFINE_bool(use_big_map_space, true,
210 "Use big map space, but don't compact if it grew too big.")
211
kasperl@chromium.orgeac059f2010-01-25 11:02:06 +0000212DEFINE_int(max_map_space_pages, MapSpace::kMaxMapPageIndex - 1,
213 "Maximum number of pages in map space which still allows to encode "
214 "forwarding pointers. That's actually a constant, but it's useful "
215 "to control it with a flag for better testing.")
216
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000217// mksnapshot.cc
218DEFINE_bool(h, false, "print this message")
ager@chromium.orgc4c92722009-11-18 14:12:51 +0000219DEFINE_bool(new_snapshot, true, "use new snapshot implementation")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000220
221// parser.cc
222DEFINE_bool(allow_natives_syntax, false, "allow natives syntax")
223
kasperl@chromium.org9bbf9682008-10-30 11:53:07 +0000224// rewriter.cc
225DEFINE_bool(optimize_ast, true, "optimize the ast")
226
ager@chromium.org5c838252010-02-19 08:53:10 +0000227// simulator-arm.cc and simulator-mips.cc
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000228DEFINE_bool(trace_sim, false, "trace simulator execution")
229DEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions")
230
231// top.cc
232DEFINE_bool(trace_exception, false,
233 "print stack trace when throwing exceptions")
234DEFINE_bool(preallocate_message_memory, false,
235 "preallocate some memory to build stack traces.")
236
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000237// v8.cc
238DEFINE_bool(preemption, false,
239 "activate a 100ms timer that switches between V8 threads")
240
ager@chromium.org381abbb2009-02-25 13:23:22 +0000241// Regexp
242DEFINE_bool(trace_regexps, false, "trace regexp execution")
ager@chromium.org381abbb2009-02-25 13:23:22 +0000243DEFINE_bool(regexp_optimization, true, "generate optimized regexp code")
fschneider@chromium.org0c20e672010-01-14 15:28:53 +0000244DEFINE_bool(regexp_entry_native, true, "use native code to enter regexp")
ager@chromium.orga74f0da2008-12-03 16:05:52 +0000245
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000246// Testing flags test/cctest/test-{flags,api,serialization}.cc
247DEFINE_bool(testing_bool_flag, true, "testing_bool_flag")
248DEFINE_int(testing_int_flag, 13, "testing_int_flag")
249DEFINE_float(testing_float_flag, 2.5, "float-flag")
250DEFINE_string(testing_string_flag, "Hello, world!", "string-flag")
251DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness")
252#ifdef WIN32
253DEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes",
254 "file in which to testing_serialize heap")
255#else
256DEFINE_string(testing_serialization_file, "/tmp/serdes",
257 "file in which to serialize heap")
258#endif
259
kasperl@chromium.org5a8ca6c2008-10-23 13:57:19 +0000260//
261// Dev shell flags
262//
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000263
ager@chromium.org3bf7b912008-11-17 09:09:45 +0000264DEFINE_bool(help, false, "Print usage message, including flags, on console")
kasperl@chromium.org5a8ca6c2008-10-23 13:57:19 +0000265DEFINE_bool(dump_counters, false, "Dump counters on exit")
christian.plesner.hansen@gmail.com37abdec2009-01-06 14:43:28 +0000266DEFINE_bool(debugger, true, "Enable JavaScript debugger")
kasperl@chromium.org7be3c992009-03-12 07:19:55 +0000267DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the "
268 "debugger agent in another process")
269DEFINE_bool(debugger_agent, false, "Enable debugger agent")
270DEFINE_int(debugger_port, 5858, "Port to use for remote debugging")
ager@chromium.orga74f0da2008-12-03 16:05:52 +0000271DEFINE_string(map_counters, false, "Map counters to a file")
ager@chromium.org3bf7b912008-11-17 09:09:45 +0000272DEFINE_args(js_arguments, JSArguments(),
273 "Pass all remaining arguments to the script. Alias for \"--\".")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000274
275//
276// Debug only flags
277//
278#undef FLAG
279#ifdef DEBUG
280#define FLAG FLAG_FULL
281#else
282#define FLAG FLAG_READONLY
283#endif
284
285// checks.cc
286DEFINE_bool(enable_slow_asserts, false,
287 "enable asserts that are slow to execute")
288
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000289// codegen-ia32.cc / codegen-arm.cc
290DEFINE_bool(trace_codegen, false,
291 "print name of functions for which code is generated")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000292DEFINE_bool(print_source, false, "pretty print source code")
293DEFINE_bool(print_builtin_source, false,
294 "pretty print source code for builtins")
295DEFINE_bool(print_ast, false, "print source AST")
296DEFINE_bool(print_builtin_ast, false, "print source AST for builtins")
christian.plesner.hansen@gmail.com9d58c2b2009-10-16 11:48:38 +0000297DEFINE_bool(print_json_ast, false, "print source AST as JSON")
298DEFINE_bool(print_builtin_json_ast, false,
299 "print source AST for builtins as JSON")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000300DEFINE_bool(trace_calls, false, "trace calls")
301DEFINE_bool(trace_builtin_calls, false, "trace builtins calls")
302DEFINE_string(stop_at, "", "function name where to insert a breakpoint")
303
304// compiler.cc
305DEFINE_bool(print_builtin_scopes, false, "print scopes for builtins")
306DEFINE_bool(print_scopes, false, "print scopes")
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000307DEFINE_bool(print_ir, false, "print the AST as seen by the backend")
ager@chromium.orgce5e87b2010-03-10 10:24:18 +0000308DEFINE_bool(print_graph_text, false,
309 "print a text representation of the flow graph")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000310
311// contexts.cc
312DEFINE_bool(trace_contexts, false, "trace contexts operations")
313
314// heap.cc
315DEFINE_bool(gc_greedy, false, "perform GC prior to some allocations")
316DEFINE_bool(gc_verbose, false, "print stuff during garbage collection")
317DEFINE_bool(heap_stats, false, "report heap statistics before and after GC")
318DEFINE_bool(code_stats, false, "report code statistics after GC")
319DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC")
320DEFINE_bool(print_handles, false, "report handles after GC")
321DEFINE_bool(print_global_handles, false, "report global handles after GC")
322DEFINE_bool(print_rset, false, "print remembered sets before GC")
323
324// ic.cc
325DEFINE_bool(trace_ic, false, "trace inline cache state transitions")
326
327// objects.cc
328DEFINE_bool(trace_normalization,
329 false,
330 "prints when objects are turned into dictionaries.")
331
332// runtime.cc
333DEFINE_bool(trace_lazy, false, "trace lazy compilation")
334
335// serialize.cc
336DEFINE_bool(debug_serialization, false,
337 "write debug information into the snapshot.")
338
339// spaces.cc
340DEFINE_bool(collect_heap_spill_statistics, false,
341 "report heap spill statistics along with heap_stats "
342 "(requires heap_stats)")
343
ager@chromium.org381abbb2009-02-25 13:23:22 +0000344// Regexp
fschneider@chromium.org0c20e672010-01-14 15:28:53 +0000345DEFINE_bool(regexp_possessive_quantifier,
346 false,
347 "enable possessive quantifier syntax for testing")
ager@chromium.org381abbb2009-02-25 13:23:22 +0000348DEFINE_bool(trace_regexp_bytecodes, false, "trace regexp bytecode execution")
349DEFINE_bool(trace_regexp_assembler,
350 false,
351 "trace regexp macro assembler calls.")
ager@chromium.orga74f0da2008-12-03 16:05:52 +0000352
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000353//
354// Logging and profiling only flags
355//
356#undef FLAG
357#ifdef ENABLE_LOGGING_AND_PROFILING
358#define FLAG FLAG_FULL
359#else
360#define FLAG FLAG_READONLY
361#endif
362
363// log.cc
364DEFINE_bool(log, false,
365 "Minimal logging (no API, code, GC, suspect, or handles samples).")
366DEFINE_bool(log_all, false, "Log all events to the log file.")
ager@chromium.org381abbb2009-02-25 13:23:22 +0000367DEFINE_bool(log_runtime, false, "Activate runtime system %Log call.")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000368DEFINE_bool(log_api, false, "Log API events to the log file.")
369DEFINE_bool(log_code, false,
370 "Log code events to the log file without profiling.")
371DEFINE_bool(log_gc, false,
372 "Log heap samples on garbage collection for the hp2ps tool.")
373DEFINE_bool(log_handles, false, "Log global handle events.")
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000374DEFINE_bool(log_snapshot_positions, false,
375 "log positions of (de)serialized objects in the snapshot.")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000376DEFINE_bool(log_state_changes, false, "Log state changes.")
377DEFINE_bool(log_suspect, false, "Log suspect operations.")
christian.plesner.hansen@gmail.com9d58c2b2009-10-16 11:48:38 +0000378DEFINE_bool(log_producers, false, "Log stack traces of JS objects allocations.")
ager@chromium.orgeadaf222009-06-16 09:43:10 +0000379DEFINE_bool(compress_log, false,
380 "Compress log to save space (makes log less human-readable).")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000381DEFINE_bool(prof, false,
382 "Log statistical profiling information (implies --log-code).")
iposva@chromium.org245aa852009-02-10 00:49:54 +0000383DEFINE_bool(prof_auto, true,
384 "Used with --prof, starts profiling automatically")
kasperl@chromium.org71affb52009-05-26 05:44:31 +0000385DEFINE_bool(prof_lazy, false,
386 "Used with --prof, only does sampling and logging"
387 " when profiler is active (implies --noprof_auto).")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000388DEFINE_bool(log_regexp, false, "Log regular expression execution.")
389DEFINE_bool(sliding_state_window, false,
390 "Update sliding state window counters.")
391DEFINE_string(logfile, "v8.log", "Specify the name of the log file.")
kasperl@chromium.orgf5aa8372009-03-24 14:47:14 +0000392DEFINE_bool(oprofile, false, "Enable JIT agent for OProfile.")
393
394//
395// Heap protection flags
396// Using heap protection requires ENABLE_LOGGING_AND_PROFILING as well.
397//
398#ifdef ENABLE_HEAP_PROTECTION
399#undef FLAG
400#define FLAG FLAG_FULL
401
402DEFINE_bool(protect_heap, false,
403 "Protect/unprotect V8's heap when leaving/entring the VM.")
404
405#endif
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000406
407//
408// Disassembler only flags
409//
410#undef FLAG
411#ifdef ENABLE_DISASSEMBLER
412#define FLAG FLAG_FULL
413#else
414#define FLAG FLAG_READONLY
415#endif
416
kasperl@chromium.org7be3c992009-03-12 07:19:55 +0000417// code-stubs.cc
418DEFINE_bool(print_code_stubs, false, "print code stubs")
419
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000420// codegen-ia32.cc / codegen-arm.cc
421DEFINE_bool(print_code, false, "print generated code")
ager@chromium.org8bb60582008-12-11 12:02:20 +0000422DEFINE_bool(print_builtin_code, false, "print generated code for builtins")
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000423
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000424// Cleanup...
425#undef FLAG_FULL
426#undef FLAG_READONLY
427#undef FLAG
428
429#undef DEFINE_bool
430#undef DEFINE_int
431#undef DEFINE_string
432
433#undef FLAG_MODE_DECLARE
434#undef FLAG_MODE_DEFINE
435#undef FLAG_MODE_DEFINE_DEFAULTS
436#undef FLAG_MODE_META