1 .TH NODE.JS "1" "2010" "" ""
5 node \- Server-side JavaScript
33 Execute without arguments to start the REPL.
38 Node is a set of libraries for javascript which allows
39 it to be used outside of the browser. It is primarily
40 focused on creating simple, easy to build network clients
46 -v, --version print node's version
48 -e, --eval script evaluate script
50 -p, --print print result of --eval
52 -i, --interactive always enter the REPL even if stdin
53 does not appear to be a terminal
55 --no-deprecation silence deprecation warnings
57 --trace-deprecation show stack traces on deprecations
59 --v8-options print v8 command line options
61 --max-stack-size=val set max v8 stack size (bytes)
64 .SH ENVIRONMENT VARIABLES
67 \':\'\-separated list of directories prefixed to the module search path.
69 .IP NODE_MODULE_CONTEXTS
70 If set to 1 then modules will load in their own global contexts.
72 .IP NODE_DISABLE_COLORS
73 If set to 1 then colors will not be used in the REPL.
77 --use_strict (enforce strict mode)
78 type: bool default: false
79 --es5_readonly (activate correct semantics for inheriting readonliness)
80 type: bool default: false
81 --es52_globals (activate new semantics for global var declarations)
82 type: bool default: false
83 --harmony_typeof (enable harmony semantics for typeof)
84 type: bool default: false
85 --harmony_scoping (enable harmony block scoping)
86 type: bool default: false
87 --harmony_modules (enable harmony modules (implies block scoping))
88 type: bool default: false
89 --harmony_proxies (enable harmony proxies)
90 type: bool default: false
91 --harmony_collections (enable harmony collections (sets, maps, and weak maps))
92 type: bool default: false
93 --harmony (enable all harmony features (except typeof))
94 type: bool default: false
95 --packed_arrays (optimizes arrays that have no holes)
96 type: bool default: false
97 --smi_only_arrays (tracks arrays with only smi values)
98 type: bool default: true
99 --clever_optimizations (Optimize object size, Array shift, DOM strings and string +)
100 type: bool default: true
101 --unbox_double_arrays (automatically unbox arrays of doubles)
102 type: bool default: true
103 --string_slices (use string slices)
104 type: bool default: true
105 --crankshaft (use crankshaft)
106 type: bool default: true
107 --hydrogen_filter (optimization filter)
108 type: string default:
109 --use_range (use hydrogen range analysis)
110 type: bool default: true
111 --eliminate_dead_phis (eliminate dead phis)
112 type: bool default: true
113 --use_gvn (use hydrogen global value numbering)
114 type: bool default: true
115 --use_canonicalizing (use hydrogen instruction canonicalizing)
116 type: bool default: true
117 --use_inlining (use function inlining)
118 type: bool default: true
119 --max_inlined_source_size (maximum source size in bytes considered for a single inlining)
120 type: int default: 600
121 --max_inlined_nodes (maximum number of AST nodes considered for a single inlining)
122 type: int default: 196
123 --max_inlined_nodes_cumulative (maximum cumulative number of AST nodes considered for inlining)
124 type: int default: 196
125 --loop_invariant_code_motion (loop invariant code motion)
126 type: bool default: true
127 --collect_megamorphic_maps_from_stub_cache (crankshaft harvests type feedback from stub cache)
128 type: bool default: true
129 --hydrogen_stats (print statistics for hydrogen)
130 type: bool default: false
131 --trace_hydrogen (trace generated hydrogen to file)
132 type: bool default: false
133 --trace_phase (trace generated IR for specified phases)
134 type: string default: Z
135 --trace_inlining (trace inlining decisions)
136 type: bool default: false
137 --trace_alloc (trace register allocator)
138 type: bool default: false
139 --trace_all_uses (trace all use positions)
140 type: bool default: false
141 --trace_range (trace range analysis)
142 type: bool default: false
143 --trace_gvn (trace global value numbering)
144 type: bool default: false
145 --trace_representation (trace representation types)
146 type: bool default: false
147 --stress_pointer_maps (pointer map for every instruction)
148 type: bool default: false
149 --stress_environments (environment for every instruction)
150 type: bool default: false
151 --deopt_every_n_times (deoptimize every n times a deopt point is passed)
153 --trap_on_deopt (put a break point before deoptimizing)
154 type: bool default: false
155 --deoptimize_uncommon_cases (deoptimize uncommon cases)
156 type: bool default: true
157 --polymorphic_inlining (polymorphic inlining)
158 type: bool default: true
159 --use_osr (use on-stack replacement)
160 type: bool default: true
161 --array_bounds_checks_elimination (perform array bounds checks elimination)
162 type: bool default: false
163 --array_index_dehoisting (perform array index dehoisting)
164 type: bool default: false
165 --trace_osr (trace on-stack replacement)
166 type: bool default: false
167 --stress_runs (number of stress runs)
169 --optimize_closures (optimize closures)
170 type: bool default: true
171 --inline_construct (inline constructor calls)
172 type: bool default: true
173 --inline_arguments (inline functions with arguments object)
174 type: bool default: true
175 --loop_weight (loop weight for representation inference)
177 --optimize_for_in (optimize functions containing for-in loops)
178 type: bool default: true
179 --experimental_profiler (enable all profiler experiments)
180 type: bool default: true
181 --watch_ic_patching (profiler considers IC stability)
182 type: bool default: false
183 --frame_count (number of stack frames inspected by the profiler)
185 --self_optimization (primitive functions trigger their own optimization)
186 type: bool default: false
187 --direct_self_opt (call recompile stub directly when self-optimizing)
188 type: bool default: false
189 --retry_self_opt (re-try self-optimization if it failed)
190 type: bool default: false
191 --count_based_interrupts (trigger profiler ticks based on counting instead of timing)
192 type: bool default: false
193 --interrupt_at_exit (insert an interrupt check at function exit)
194 type: bool default: false
195 --weighted_back_edges (weight back edges by jump distance for interrupt triggering)
196 type: bool default: false
197 --interrupt_budget (execution budget before interrupt is triggered)
198 type: int default: 5900
199 --type_info_threshold (percentage of ICs that must have type info to allow optimization)
200 type: int default: 15
201 --self_opt_count (call count before self-optimization)
202 type: int default: 130
203 --trace_opt_verbose (extra verbose compilation tracing)
204 type: bool default: false
205 --debug_code (generate extra code (assertions) for debugging)
206 type: bool default: false
207 --code_comments (emit comments in code disassembly)
208 type: bool default: false
209 --enable_sse2 (enable use of SSE2 instructions if available)
210 type: bool default: true
211 --enable_sse3 (enable use of SSE3 instructions if available)
212 type: bool default: true
213 --enable_sse4_1 (enable use of SSE4.1 instructions if available)
214 type: bool default: true
215 --enable_cmov (enable use of CMOV instruction if available)
216 type: bool default: true
217 --enable_rdtsc (enable use of RDTSC instruction if available)
218 type: bool default: true
219 --enable_sahf (enable use of SAHF instruction if available (X64 only))
220 type: bool default: true
221 --enable_vfp3 (enable use of VFP3 instructions if available - this implies enabling ARMv7 instructions (ARM only))
222 type: bool default: true
223 --enable_armv7 (enable use of ARMv7 instructions if available (ARM only))
224 type: bool default: true
225 --enable_fpu (enable use of MIPS FPU instructions if available (MIPS only))
226 type: bool default: true
227 --expose_natives_as (expose natives in global object)
228 type: string default: NULL
229 --expose_debug_as (expose debug in global object)
230 type: string default: NULL
231 --expose_gc (expose gc extension)
232 type: bool default: false
233 --expose_externalize_string (expose externalize string extension)
234 type: bool default: false
235 --stack_trace_limit (number of stack frames to capture)
236 type: int default: 10
237 --builtins_in_stack_traces (show built-in functions in stack traces)
238 type: bool default: false
239 --disable_native_files (disable builtin natives files)
240 type: bool default: false
241 --inline_new (use fast inline allocation)
242 type: bool default: true
243 --stack_trace_on_abort (print a stack trace if an assertion failure occurs)
244 type: bool default: true
245 --trace (trace function calls)
246 type: bool default: false
247 --mask_constants_with_cookie (use random jit cookie to mask large constants)
248 type: bool default: true
249 --lazy (use lazy compilation)
250 type: bool default: true
251 --trace_opt (trace lazy optimization)
252 type: bool default: false
253 --trace_opt_stats (trace lazy optimization statistics)
254 type: bool default: false
255 --opt (use adaptive optimizations)
256 type: bool default: true
257 --always_opt (always try to optimize functions)
258 type: bool default: false
259 --prepare_always_opt (prepare for turning on always opt)
260 type: bool default: false
261 --trace_deopt (trace deoptimization)
262 type: bool default: false
263 --min_preparse_length (minimum length for automatic enable preparsing)
264 type: int default: 1024
265 --always_full_compiler (try to use the dedicated run-once backend for all code)
266 type: bool default: false
267 --trace_bailout (print reasons for falling back to using the classic V8 backend)
268 type: bool default: false
269 --compilation_cache (enable compilation cache)
270 type: bool default: true
271 --cache_prototype_transitions (cache prototype transitions)
272 type: bool default: true
273 --trace_debug_json (trace debugging JSON request/response)
274 type: bool default: false
275 --debugger_auto_break (automatically set the debug break flag when debugger commands are in the queue)
276 type: bool default: true
277 --enable_liveedit (enable liveedit experimental feature)
278 type: bool default: true
279 --break_on_abort (always cause a debug break before aborting)
280 type: bool default: true
281 --stack_size (default size of stack region v8 is allowed to use (in kBytes))
282 type: int default: 984
283 --max_stack_trace_source_length (maximum length of function source code printed in a stack trace.)
284 type: int default: 300
285 --always_inline_smi_code (always inline smi code in non-opt code)
286 type: bool default: false
287 --max_new_space_size (max size of the new generation (in kBytes))
289 --max_old_space_size (max size of the old generation (in Mbytes))
291 --max_executable_size (max size of executable memory (in Mbytes))
293 --gc_global (always perform global GCs)
294 type: bool default: false
295 --gc_interval (garbage collect after <n> allocations)
296 type: int default: -1
297 --trace_gc (print one trace line following each garbage collection)
298 type: bool default: false
299 --trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection)
300 type: bool default: false
301 --print_cumulative_gc_stat (print cumulative GC statistics in name=value format on exit)
302 type: bool default: false
303 --trace_gc_verbose (print more details following each garbage collection)
304 type: bool default: false
305 --trace_fragmentation (report fragmentation for old pointer and data pages)
306 type: bool default: false
307 --collect_maps (garbage collect maps from which no objects can be reached)
308 type: bool default: true
309 --flush_code (flush code that we expect not to use again before full gc)
310 type: bool default: true
311 --incremental_marking (use incremental marking)
312 type: bool default: true
313 --incremental_marking_steps (do incremental marking steps)
314 type: bool default: true
315 --trace_incremental_marking (trace progress of the incremental marking)
316 type: bool default: false
317 --use_idle_notification (Use idle notification to reduce memory footprint.)
318 type: bool default: true
319 --send_idle_notification (Send idle notifcation between stress runs.)
320 type: bool default: false
321 --use_ic (use inline caching)
322 type: bool default: true
323 --native_code_counters (generate extra code for manipulating stats counters)
324 type: bool default: false
325 --always_compact (Perform compaction on every full GC)
326 type: bool default: false
327 --lazy_sweeping (Use lazy sweeping for old pointer and data spaces)
328 type: bool default: true
329 --never_compact (Never perform compaction on full GC - testing only)
330 type: bool default: false
331 --compact_code_space (Compact code space on full non-incremental collections)
332 type: bool default: true
333 --cleanup_code_caches_at_gc (Flush inline caches prior to mark compact collection and flush code caches in maps during mark compact cycle.)
334 type: bool default: true
335 --random_seed (Default seed for initializing random generator (0, the default, means to use system random).)
337 --use_verbose_printer (allows verbose printing)
338 type: bool default: true
339 --allow_natives_syntax (allow natives syntax)
340 type: bool default: false
341 --trace_sim (Trace simulator execution)
342 type: bool default: false
343 --check_icache (Check icache flushes in ARM and MIPS simulator)
344 type: bool default: false
345 --stop_sim_at (Simulator stop after x number of instructions)
347 --sim_stack_alignment (Stack alingment in bytes in simulator (4 or 8, 8 is default))
349 --trace_exception (print stack trace when throwing exceptions)
350 type: bool default: false
351 --preallocate_message_memory (preallocate some memory to build stack traces.)
352 type: bool default: false
353 --randomize_hashes (randomize hashes to avoid predictable hash collisions (with snapshots this option cannot override the baked-in seed))
354 type: bool default: true
355 --hash_seed (Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed))
357 --preemption (activate a 100ms timer that switches between V8 threads)
358 type: bool default: false
359 --regexp_optimization (generate optimized regexp code)
360 type: bool default: true
361 --testing_bool_flag (testing_bool_flag)
362 type: bool default: true
363 --testing_int_flag (testing_int_flag)
364 type: int default: 13
365 --testing_float_flag (float-flag)
366 type: float default: 2.500000
367 --testing_string_flag (string-flag)
368 type: string default: Hello, world!
369 --testing_prng_seed (Seed used for threading test randomness)
370 type: int default: 42
371 --testing_serialization_file (file in which to serialize heap)
372 type: string default: /tmp/serdes
373 --help (Print usage message, including flags, on console)
374 type: bool default: true
375 --dump_counters (Dump counters on exit)
376 type: bool default: false
377 --debugger (Enable JavaScript debugger)
378 type: bool default: false
379 --remote_debugger (Connect JavaScript debugger to the debugger agent in another process)
380 type: bool default: false
381 --debugger_agent (Enable debugger agent)
382 type: bool default: false
383 --debugger_port (Port to use for remote debugging)
384 type: int default: 5858
385 --map_counters (Map counters to a file)
386 type: string default:
387 --js_arguments (Pass all remaining arguments to the script. Alias for "--".)
388 type: arguments default:
389 --debug_compile_events (Enable debugger compile events)
390 type: bool default: true
391 --debug_script_collected_events (Enable debugger script collected events)
392 type: bool default: true
393 --gdbjit (enable GDBJIT interface (disables compacting GC))
394 type: bool default: false
395 --gdbjit_full (enable GDBJIT interface for all code objects)
396 type: bool default: false
397 --gdbjit_dump (dump elf objects with debug info to disk)
398 type: bool default: false
399 --gdbjit_dump_filter (dump only objects containing this substring)
400 type: string default:
401 --force_marking_deque_overflows (force overflows of marking deque by reducing it's size to 64 words)
402 type: bool default: false
403 --stress_compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows))
404 type: bool default: false
405 --log (Minimal logging (no API, code, GC, suspect, or handles samples).)
406 type: bool default: false
407 --log_all (Log all events to the log file.)
408 type: bool default: false
409 --log_runtime (Activate runtime system %Log call.)
410 type: bool default: false
411 --log_api (Log API events to the log file.)
412 type: bool default: false
413 --log_code (Log code events to the log file without profiling.)
414 type: bool default: false
415 --log_gc (Log heap samples on garbage collection for the hp2ps tool.)
416 type: bool default: false
417 --log_handles (Log global handle events.)
418 type: bool default: false
419 --log_snapshot_positions (log positions of (de)serialized objects in the snapshot.)
420 type: bool default: false
421 --log_suspect (Log suspect operations.)
422 type: bool default: false
423 --prof (Log statistical profiling information (implies --log-code).)
424 type: bool default: false
425 --prof_auto (Used with --prof, starts profiling automatically)
426 type: bool default: true
427 --prof_lazy (Used with --prof, only does sampling and logging when profiler is active (implies --noprof_auto).)
428 type: bool default: false
429 --prof_browser_mode (Used with --prof, turns on browser-compatible mode for profiling.)
430 type: bool default: true
431 --log_regexp (Log regular expression execution.)
432 type: bool default: false
433 --sliding_state_window (Update sliding state window counters.)
434 type: bool default: false
435 --logfile (Specify the name of the log file.)
436 type: string default: v8.log
437 --ll_prof (Enable low-level linux profiler.)
438 type: bool default: false
440 .SH RESOURCES AND DOCUMENTATION
442 See the website for documentation http://nodejs.org/
444 Mailing list: http://groups.google.com/group/nodejs
446 IRC: irc.freenode.net #node.js