
parrot - Parrot Virtual Machine

parrot [-options] <file> [arguments ...]

Parrot is a virtual machine designed to efficiently compile and execute bytecode for dynamic languages. Parrot currently hosts a variety of language implementations in various stages of completion, including Tcl, Javascript, Ruby, Lua, Scheme, PHP, Python, Perl 6, APL, and a .NET bytecode translator. Parrot is not about parrots, but we are rather fond of them, for obvious reasons.

path to the include search path.path to the library search path.Sets the hash seed to the specified value. This option is useful for debugging intermittent failures, but should not be used in production. For more information about this option, see docs/dev/profiling.pod, docs/project/hacking_tips.pod, docs/running.pod, and docs/submissions.pod.
path to the dynamic extension search path.These options select the runcore, which is useful for performance tuning and debugging. For more information about these options, see the "About runcores" section in docs/running.pod.
Select the runcore. The following cores are available in Parrot, but not all may be available on your system:
slow, bounds bounds checking core (default) fast bare-bones core without bounds-checking or context-updating subprof subroutine-level profiler (see POD in 'src/runcore/subprof.c') trace bounds checking core with trace info (see 'parrot --help-debug') profiling see 'docs/dev/profilling.pod' gcdebug performs a full GC run before every op dispatch (good for debugging GC problems)
See
parrot --help-debugfor available flag bits.
Turn on interpreter debug flag. See
parrot --help-debugfor available flag bits.
See
parrot --help-debugfor available flag bits.
This may prove useful for finding GC-related bugs.
Do not use this option for longer running programs: since memory is no longer recycled, it may quickly become exhausted.
Maximum memory wasted by GC
Size of gen0 (default 2)
This imposes some stress on the GC subsystem and can considerably slow down execution.
Free all memory of the last interpreter. This is useful when running leak checkers.
This is useful when you want to attach a debugger on platforms such as Windows.
Print the runtime prefix path and exit.
The -d switch takes an optional argument, consisting of a hexadecimal value of debug bits. If no value is supplied, 'debug' is set to 1.
To list the individual bits on the command line, use the --help-debug switch.
To produce a vary large output on stderr, run
"parrot -d 0ffff ...".
-v shows which files are worked on and printsa summary over register usage and optimization stats per subroutine. With two
-vswitches,parrotprints a line per individual processing step too.
Preprocess source file (expand macros) and print result to
stdout:$> parrot -E t/op/macro_10.pasm $> parrot -E t/op/macro_10.pasm | parrot -- -
unless the -r is supplied as well. If 'outputfile' ends with .pbc, 'parrot' will write a PBC file. If it ends with .pasm, 'parrot' will output a PASM file, even from PASM input. This can be useful when needing to check various optimizations, including
-Op.
even if the output file does not end in .pbc
Optimization levels
-O0 no optimization (default) -O1 optimizations without life info (e.g. branches) -O same -O2 optimizations with life info -Op rewrite I and N PASM registers most used first -Ot select fastest runcore -Oc turns on the optional/experimental tail call optimizationsSee docs/dev/optimizer.pod for more information on the optimizer.
Optimization is currently an experimental feature and these options are likely to change.
stdin.stdin and execute it.NOTE: If whitespace separates the -d switch from the argument, the argument must start with a number, i.e., a decimal digit.
-o or --output-pbc.Execute the program from the compiled in-memory image. If two
-roptions are supplied, the .pbc file is read from disc and executed. This is needed, primarily, for tests.
If the file ends in .pbc it will be interpreted immediately.
If the file ends in .pasm, then it is parsed as PASM code. Otherwise, it is parsed as PIR code. In both cases, it will then be executed, unless the -o flag was supplied.
If the file is a single dash, input from stdin is read.
Optional arguments passed to the running program as ARGV. The program is assumed to know what to do with the arguments.

If this environment variable is set, parrot will use this path as its runtime prefix instead of the compiled-in path. This is useful if you want to execute a version of parrot different from the one on the "compiled-in" path.
Turn on the --gc-debug flag.

'docs/running.pod' Additional information on command line options.
http://www.parrot.org/ The official Parrot web site.
http://docs.parrot.org/ Parrot's official documentation site.
http://parrot.github.com/ An alternative documentation site.

For information on how to submit a bug report, see docs/submissions.pod.

Parrot is a product of the contributions of a great many people. For a list of most of these people, see CREDITS.

Copyright (C) 2001-2011, Parrot Foundation.