Usage: /usr/bin/js91 [options] [[script] scriptArgs*]
The SpiderMonkey shell provides a command line interface to the
JavaScript engine. Code and file options provided via the command
line are run left to right. If provided, the optional script argument
is run after all options have been processed. Just-In-Time
compilation modes may be enabled via command line options.
Version: JavaScript-C91.13.0
Arguments:
script A script to execute (after all options)
scriptArgs String arguments to bind as |scriptArgs| in the shell's global
Options:
-f --file=PATH File path to run, parsing file
contents as UTF-8
-u --utf16-file=PATH File path to run, inflating the
file's UTF-8 contents to UTF-16 and
then parsing that
-m --module=PATH Module path to run
-e --execute=CODE Inline code to run
--selfhosted-xdr-path=[filename] Read/Write selfhosted script data
from/to the given XDR file
--selfhosted-xdr-mode=(encode,decode,off) Whether to encode/decode data of the
file providedwith
--selfhosted-xdr-path.
-i --shell Enter prompt after running code
-c --compileonly Only compile, don't run (syntax
checking mode)
-w --warnings Emit warnings
-W --nowarnings Don't emit warnings
-D --dump-bytecode Dump bytecode with exec count for
all scripts
-b --print-timing Print sub-ms runtime for each file
that's run
--code-coverage Enable code coverage
instrumentation.
--disable-parser-deferred-alloc Disable deferred allocation of GC
objects until after parser
--cpu-count=COUNT Set the number of CPUs (hardware
threads) to COUNT, the default is
the actual number of CPUs. The total
number of background helper threads
is the CPU count plus some constant.
--thread-count=COUNT Alias for --cpu-count.
--ion Enable IonMonkey (default)
--no-ion Disable IonMonkey
--no-ion-for-main-context Disable IonMonkey for the main
context only
--inlining-entry-threshold=COUNT The minimum stub entry count before
trial-inlining a call
--small-function-length=COUNT The maximum bytecode length of a
'small function' for the purpose of
inlining.
--no-asmjs Disable asm.js compilation
--wasm-compiler=[option] Choose to enable a subset of the
wasm compilers, valid options are
'none', 'baseline', 'ion',
'cranelift', 'optimizing',
'baseline+ion',
'baseline+cranelift',
'baseline+optimizing'. Choosing
'ion' when Ion is not available or
'cranelift' when Cranelift is not
available will fail; use
'optimizing' for cross-compiler
compatibility.
--wasm-verbose Enable WebAssembly verbose logging
--disable-wasm-huge-memory Disable WebAssembly huge memory
--test-wasm-await-tier2 Forcibly activate tiering and block
instantiation on completion of tier2
--no-wasm-simd Disable wasm simdfeature.
--wasm-extended-const Enable experimental wasm
extended-constfeature.
--wasm-exceptions Enable experimental wasm
exceptionsfeature.
--wasm-function-references Enable experimental wasm
function-referencesfeature.
--wasm-gc Enable experimental wasm gcfeature.
--wasm-relaxed-simd Enable experimental wasm
relaxed-simdfeature.
--wasm-simd-wormhole Enable wasm SIMD wormhole (UTSL)
--no-native-regexp Disable native regexp compilation
--regexp-warmup-threshold=COUNT Wait for COUNT invocations before
compiling regexps to native code
(default 10)
--trace-regexp-parser Trace regexp parsing
--trace-regexp-assembler Trace regexp assembler
--trace-regexp-interpreter Trace regexp interpreter
--trace-regexp-peephole Trace regexp peephole optimization
--enable-streams Enable WHATWG Streams (default)
--no-streams Disable WHATWG Streams
--enable-readable-byte-streams Enable support for WHATWG
ReadableStreams of type 'bytes'
--enable-byob-stream-readers Enable support for getting BYOB
readers for WHATWG ReadableStreams
of type "bytes"
--enable-writable-streams Enable support for WHATWG
WritableStreams
--enable-readablestream-pipeto Enable support for WHATWG
ReadableStream.prototype.pipeTo
--disable-weak-refs Disable weak references
--disable-tosource Disable toSource/uneval
--disable-property-error-message-fix Disable fix for the error message
when accessing property of null or
undefined
--enable-iterator-helpers Enable iterator helpers
--disable-private-fields Disable private class fields
--disable-private-methods Disable private class methods
--enable-ergonomic-brand-checks Enable ergonomic brand checks for
private class fields (no-op)
--disable-ergonomic-brand-checks Disable ergonomic brand checks for
private class fields
--enable-top-level-await Enable top-level await
--enable-class-static-blocks Enable class static blocks
--off-thread-parse-global Use parseGlobal in all off-thread
compilation
--no-large-arraybuffers Disallow creating ArrayBuffers
larger than 2 GB on 64-bit platforms
--shared-memory=on/off SharedArrayBuffer and Atomics
(default: on, off to disable)
--spectre-mitigations=on/off Whether Spectre mitigations are
enabled (default: off, on to enable)
--cache-ir-stubs=on/off/call Use CacheIR stubs (default: on, off
to disable, call to enable
work-in-progress call ICs)
--ion-shared-stubs=on/off Use shared stubs (default: on, off
to disable)
--ion-scalar-replacement=on/off Scalar Replacement (default: on, off
to disable)
--ion-gvn=[mode] Specify Ion global value numbering:
off: disable GVN
on: enable GVN (default)
--ion-licm=on/off Loop invariant code motion (default:
on, off to disable)
--ion-edgecase-analysis=on/off Find edge cases where Ion can avoid
bailouts (default: on, off to
disable)
--ion-pruning=on/off Branch pruning (default: on, off to
disable)
--ion-range-analysis=on/off Range analysis (default: on, off to
disable)
--ion-sink=on/off Sink code motion (default: off, on
to enable)
--ion-optimization-levels=on/off No-op for fuzzing
--ion-loop-unrolling=on/off (NOP for fuzzers)
--ion-instruction-reordering=on/off Instruction reordering (default:
off, on to enable)
--ion-check-range-analysis Range analysis checking
--ion-extra-checks Perform extra dynamic validation
checks
--ion-inlining=on/off Inline methods where possible
(default: on, off to disable)
--ion-osr=on/off On-Stack Replacement (default: on,
off to disable)
--disable-bailout-loop-check Turn off bailout loop check
--scalar-replace-arguments Use scalar replacement to optimize
ArgumentsObject
--ion-limit-script-size=on/off Don't compile very large scripts
(default: on, off to disable)
--ion-warmup-threshold=COUNT Wait for COUNT calls or iterations
before compiling at the normal
optimization level (default: 1000)
--ion-full-warmup-threshold=COUNT No-op for fuzzing
--ion-regalloc=[mode] Specify Ion register allocation:
backtracking: Priority based
backtracking register allocation
(default)
testbed: Backtracking allocator
with experimental features
stupid: Simple block local
register allocation
--ion-eager Always ion-compile methods (implies
--baseline-eager)
--fast-warmup Reduce warmup thresholds for each
tier.
--ion-offthread-compile=on/off Compile scripts off thread (default:
on)
--ion-parallel-compile=on/off --ion-parallel compile is
deprecated. Use
--ion-offthread-compile.
--baseline Enable baseline compiler (default)
--no-baseline Disable baseline compiler
--no-warp-async Don't Warp compile Async Functions
--no-warp-generator Warp compile Generator Functions
--warp-async Warp compile Async Functions
--warp-generator Don't Warp compile Generator
Functions
--baseline-eager Always baseline-compile methods
--baseline-warmup-threshold=COUNT Wait for COUNT calls or iterations
before baseline-compiling (default:
10)
--blinterp Enable Baseline Interpreter
(default)
--no-blinterp Disable Baseline Interpreter
--blinterp-eager Always Baseline-interpret scripts
--blinterp-warmup-threshold=COUNT Wait for COUNT calls or iterations
before Baseline-interpreting
(default: 10)
--trial-inlining-warmup-threshold=COUNT Wait for COUNT calls or iterations
before trial-inlining (default: 500)
--non-writable-jitcode (NOP for fuzzers) Allocate JIT code
as non-writable memory.
--no-sse3 Pretend CPU does not support SSE3
instructions and above to test JIT
codegen (no-op on platforms other
than x86 and x64).
--no-ssse3 Pretend CPU does not support SSSE3
[sic] instructions and above to test
JIT codegen (no-op on platforms
other than x86 and x64).
--no-sse41 Pretend CPU does not support SSE4.1
instructions to test JIT codegen
(no-op on platforms other than x86
and x64).
--no-sse4 Alias for --no-sse41
--no-sse42 Pretend CPU does not support SSE4.2
instructions to test JIT codegen
(no-op on platforms other than x86
and x64).
--enable-avx AVX is disabled by default. Enable
AVX. (no-op on platforms other than
x86 and x64).
--no-avx No-op. AVX is currently disabled by
default.
--more-compartments Make newGlobal default to creating a
new compartment.
--fuzzing-safe Don't expose functions that aren't
safe for fuzzers to call
--disable-oom-functions Disable functions that cause
artificial OOMs
--no-threads Disable helper threads
--no-ggc Disable Generational GC
--no-cgc Disable Compacting GC
--no-incremental-gc Disable Incremental GC
--nursery-strings=on/off Allocate strings in the nursery
--nursery-bigints=on/off Allocate BigInts in the nursery
--available-memory=SIZE Select GC settings based on
available memory (MB)
--arm-hwcap=[features] Specify ARM code generation
features, or 'help' to list all
features.
--arm-asm-nop-fill=SIZE Insert the given number of NOP
instructions at all possible pool
locations.
--asm-pool-max-offset=OFFSET The maximum pc relative OFFSET
permitted in pool reference
instructions.
--arm-sim-icache-checks Enable icache flush checks in the
ARM simulator.
--arm-sim-stop-at=NUMBER Stop the ARM simulator after the
given NUMBER of instructions.
--mips-sim-icache-checks Enable icache flush checks in the
MIPS simulator.
--mips-sim-stop-at=NUMBER Stop the MIPS simulator after the
given NUMBER of instructions.
--nursery-size=SIZE-MB Set the maximum nursery size in MB
-z --gc-zeal=LEVEL(;LEVEL)*[,N] option ignored in non-gc-zeal builds
--module-load-path=DIR Set directory to load modules from
--no-source-pragmas Disable source(Mapping)URL pragma
parsing
--no-async-stacks Disable async stacks
--async-stacks-capture-debuggee-only Limit async stack capture to only
debuggees
--dll=LIBRARY Dynamically load LIBRARY
--suppress-minidump Suppress crash minidumps
--smoosh No-op
--wasm-compile-and-serialize Compile the wasm bytecode from stdin
and serialize the results to stdout
--telemetry-dir=[directory] Output telemetry results in a
directory
--use-fdlibm-for-sin-cos-tan Use fdlibm for Math.sin, Math.cos,
and Math.tan
Options (134)
| Option | Description | Source |
|---|---|---|
-f --file=PATH | File path to run, parsing file contents as UTF-8 | help |
-u --utf16-file=PATH | File path to run, inflating the file's UTF-8 contents to UTF-16 and then parsing that | help |
-m --module=PATH | Module path to run | help |
-e --execute=CODE | Inline code to run | help |
--selfhosted-xdr-path filename | Read/Write selfhosted script data from/to the given XDR file | help |
-i --shell | Enter prompt after running code | help |
-c --compileonly | Only compile, don't run (syntax checking mode) | help |
-w --warnings | Emit warnings | help |
-W --nowarnings | Don't emit warnings | help |
-D --dump-bytecode | Dump bytecode with exec count for all scripts | help |
-b --print-timing | Print sub-ms runtime for each file that's run | help |
--code-coverage | Enable code coverage instrumentation. | help |
--disable-parser-deferred-alloc | Disable deferred allocation of GC objects until after parser | help |
--cpu-count COUNT | Set the number of CPUs (hardware threads) to COUNT, the default is the actual number of CPUs. | help |
--thread-count COUNT | Alias for --cpu-count. | help |
--ion | Enable IonMonkey (default) | help |
--no-ion | Disable IonMonkey | help |
--no-ion-for-main-context | Disable IonMonkey for the main context only | help |
--inlining-entry-threshold COUNT | The minimum stub entry count before trial-inlining a call | help |
--small-function-length COUNT | The maximum bytecode length of a 'small function' for the purpose of inlining. | help |
--no-asmjs | Disable asm.js compilation | help |
--wasm-compiler option | Choose to enable a subset of the wasm compilers, valid options are 'none', 'baseline', 'ion', 'cranelift', 'optimizing', 'baseline+ion', 'baseline+cranelift', 'baseline+optimizing'. | help |
--wasm-verbose | Enable WebAssembly verbose logging | help |
--disable-wasm-huge-memory | Disable WebAssembly huge memory | help |
--test-wasm-await-tier2 | Forcibly activate tiering and block instantiation on completion of tier2 | help |
--no-wasm-simd | Disable wasm simdfeature. | help |
--wasm-extended-const | Enable experimental wasm extended-constfeature. | help |
--wasm-exceptions | Enable experimental wasm exceptionsfeature. | help |
--wasm-function-references | Enable experimental wasm function-referencesfeature. | help |
--wasm-gc | Enable experimental wasm gcfeature. | help |
--wasm-relaxed-simd | Enable experimental wasm relaxed-simdfeature. | help |
--wasm-simd-wormhole | Enable wasm SIMD wormhole (UTSL) | help |
--no-native-regexp | Disable native regexp compilation | help |
--regexp-warmup-threshold COUNT | Wait for COUNT invocations before compiling regexps to native code (default 10) | help |
--trace-regexp-parser | Trace regexp parsing | help |
--trace-regexp-assembler | Trace regexp assembler | help |
--trace-regexp-interpreter | Trace regexp interpreter | help |
--trace-regexp-peephole | Trace regexp peephole optimization | help |
--enable-streams | Enable WHATWG Streams (default) | help |
--no-streams | Disable WHATWG Streams | help |
--enable-readable-byte-streams | Enable support for WHATWG ReadableStreams of type 'bytes' | help |
--enable-byob-stream-readers | Enable support for getting BYOB readers for WHATWG ReadableStreams of type "bytes" | help |
--enable-writable-streams | Enable support for WHATWG WritableStreams | help |
--enable-readablestream-pipeto | Enable support for WHATWG ReadableStream.prototype.pipeTo | help |
--disable-weak-refs | Disable weak references | help |
--disable-tosource | Disable toSource/uneval | help |
--disable-property-error-message-fix | Disable fix for the error message when accessing property of null or undefined | help |
--enable-iterator-helpers | Enable iterator helpers | help |
--disable-private-fields | Disable private class fields | help |
--disable-private-methods | Disable private class methods | help |
--enable-ergonomic-brand-checks | Enable ergonomic brand checks for private class fields (no-op) | help |
--disable-ergonomic-brand-checks | Disable ergonomic brand checks for private class fields | help |
--enable-top-level-await | Enable top-level await | help |
--enable-class-static-blocks | Enable class static blocks | help |
--off-thread-parse-global | Use parseGlobal in all off-thread compilation | help |
--no-large-arraybuffers | Disallow creating ArrayBuffers larger than 2 GB on 64-bit platforms | help |
--shared-memory on/off | SharedArrayBuffer and Atomics (default: on, off to disable) | help |
--spectre-mitigations on/off | Whether Spectre mitigations are enabled (default: off, on to enable) | help |
--cache-ir-stubs on/off/call | Use CacheIR stubs (default: on, off to disable, call to enable work-in-progress call ICs) | help |
--ion-shared-stubs on/off | Use shared stubs (default: on, off to disable) | help |
--ion-scalar-replacement on/off | Scalar Replacement (default: on, off to disable) | help |
--ion-gvn mode | Specify Ion global value numbering: off: disable GVN on: enable GVN (default) | help |
--ion-licm on/off | Loop invariant code motion (default: on, off to disable) | help |
--ion-edgecase-analysis on/off | Find edge cases where Ion can avoid bailouts (default: on, off to disable) | help |
--ion-pruning on/off | Branch pruning (default: on, off to disable) | help |
--ion-range-analysis on/off | Range analysis (default: on, off to disable) | help |
--ion-sink on/off | Sink code motion (default: off, on to enable) | help |
--ion-optimization-levels on/off | No-op for fuzzing | help |
--ion-loop-unrolling on/off | (NOP for fuzzers) | help |
--ion-instruction-reordering on/off | Instruction reordering (default: off, on to enable) | help |
--ion-check-range-analysis | Range analysis checking | help |
--ion-extra-checks | Perform extra dynamic validation checks | help |
--ion-inlining on/off | Inline methods where possible (default: on, off to disable) | help |
--ion-osr on/off | On-Stack Replacement (default: on, off to disable) | help |
--disable-bailout-loop-check | Turn off bailout loop check | help |
--scalar-replace-arguments | Use scalar replacement to optimize ArgumentsObject | help |
--ion-limit-script-size on/off | Don't compile very large scripts (default: on, off to disable) | help |
--ion-warmup-threshold COUNT | Wait for COUNT calls or iterations before compiling at the normal optimization level (default: 1000) | help |
--ion-full-warmup-threshold COUNT | No-op for fuzzing | help |
--ion-regalloc mode | Specify Ion register allocation: backtracking: Priority based backtracking register allocation (default) testbed: Backtracking allocator with experimental features stupid: Simple block local register… | help |
--ion-eager | Always ion-compile methods (implies | help |
--fast-warmup | Reduce warmup thresholds for each tier. | help |
--ion-offthread-compile on/off | Compile scripts off thread (default: on) | help |
--ion-parallel-compile on/off | --ion-parallel compile is deprecated. | help |
--baseline | Enable baseline compiler (default) | help |
--no-baseline | Disable baseline compiler | help |
--no-warp-async | Don't Warp compile Async Functions | help |
--no-warp-generator | Warp compile Generator Functions | help |
--warp-async | Warp compile Async Functions | help |
--warp-generator | Don't Warp compile Generator Functions | help |
--baseline-eager | Always baseline-compile methods | help |
--baseline-warmup-threshold COUNT | Wait for COUNT calls or iterations before baseline-compiling (default: 10) | help |
--blinterp | Enable Baseline Interpreter (default) | help |
--no-blinterp | Disable Baseline Interpreter | help |
--blinterp-eager | Always Baseline-interpret scripts | help |
--blinterp-warmup-threshold COUNT | Wait for COUNT calls or iterations before Baseline-interpreting (default: 10) | help |
--trial-inlining-warmup-threshold COUNT | Wait for COUNT calls or iterations before trial-inlining (default: 500) | help |
--non-writable-jitcode | (NOP for fuzzers) Allocate JIT code as non-writable memory. | help |
--no-sse3 | Pretend CPU does not support SSE3 instructions and above to test JIT codegen (no-op on platforms other than x86 and x64). | help |
--no-ssse3 | Pretend CPU does not support SSSE3 [sic] instructions and above to test JIT codegen (no-op on platforms other than x86 and x64). | help |
--no-sse41 | Pretend CPU does not support SSE4.1 instructions to test JIT codegen (no-op on platforms other than x86 and x64). | help |
--no-sse4 | Alias for --no-sse41 | help |
--no-sse42 | Pretend CPU does not support SSE4.2 instructions to test JIT codegen (no-op on platforms other than x86 and x64). | help |
--enable-avx | AVX is disabled by default. | help |
--no-avx | No-op. | help |
--more-compartments | Make newGlobal default to creating a new compartment. | help |
--fuzzing-safe | Don't expose functions that aren't safe for fuzzers to call | help |
--disable-oom-functions | Disable functions that cause artificial OOMs | help |
--no-threads | Disable helper threads | help |
--no-ggc | Disable Generational GC | help |
--no-cgc | Disable Compacting GC | help |
--no-incremental-gc | Disable Incremental GC | help |
--nursery-strings on/off | Allocate strings in the nursery | help |
--nursery-bigints on/off | Allocate BigInts in the nursery | help |
--available-memory SIZE | Select GC settings based on available memory (MB) | help |
--arm-hwcap features | Specify ARM code generation features, or 'help' to list all features. | help |
--arm-asm-nop-fill SIZE | Insert the given number of NOP instructions at all possible pool locations. | help |
--asm-pool-max-offset OFFSET | The maximum pc relative OFFSET permitted in pool reference instructions. | help |
--arm-sim-icache-checks | Enable icache flush checks in the ARM simulator. | help |
--arm-sim-stop-at NUMBER | Stop the ARM simulator after the given NUMBER of instructions. | help |
--mips-sim-icache-checks | Enable icache flush checks in the MIPS simulator. | help |
--mips-sim-stop-at NUMBER | Stop the MIPS simulator after the given NUMBER of instructions. | help |
--nursery-size SIZE-MB | Set the maximum nursery size in MB | help |
-z --gc-zeal=LEVEL(;LEVEL)* | option ignored in non-gc-zeal builds | help |
--module-load-path DIR | Set directory to load modules from | help |
--no-source-pragmas | Disable source(Mapping)URL pragma parsing | help |
--no-async-stacks | Disable async stacks | help |
--async-stacks-capture-debuggee-only | Limit async stack capture to only debuggees | help |
--dll LIBRARY | Dynamically load LIBRARY | help |
--suppress-minidump | Suppress crash minidumps | help |
--smoosh | No-op | help |
--wasm-compile-and-serialize | Compile the wasm bytecode from stdin and serialize the results to stdout | help |
--telemetry-dir directory | Output telemetry results in a directory | help |
--use-fdlibm-for-sin-cos-tan | Use fdlibm for Math.sin, Math.cos, and Math.tan | help |