parrotcode: Running Parrot | |
Contents | Documentation |
docs/running.pod - Running Parrot
This file briefly describes the current set of executables and what they're for.
parrot
parrot foo.pbc
parrot foo.pasm
-o
flag: parrot -o foo.pbc foo.pasm
foo.pbc
, but does not execute it.argv
) are placed into an SArray PMC which is passed into the program in PMC register P5. For the invocation: parrot foo.pbc --foo_arg process_me.foo
foo.pbc
, --foo_arg
, and process_me.foo
.parrot
has four different opcode dispatchers: normal, computed goto, prederef, and JIT. The default mode is normal, or computed goto if that is supported by your compiler (gcc supports it). You may pass the -g
flag to parrot
to use the normal dispatcher even if you have computed goto available. Prederef mode is specified with -P
, JIT mode with -j
.#define DYNAMIC_OPLIBS
to the top of interpreter.c. Then, on most Unix platforms: make clean
make shared
LD_LIBRARY_PATH=blib/lib ./parrot -P foo.pbc
make shared
.parrot
also has several debugging and tracing flags; see the usage description (generated by parrot -h
) for details.parrot -t
will trace the execution of the Parrot opcodes. The values of the registers are shown as they are before the opcode is executed.make test
will compile anything that needs to be compiled and run all standard regression tests, with garbage collection/memory management debugging enabled. (Collectively called GC_DEBUG, this is accomplished by either passing the --gc-debug flag to the parrot binary, or setting the environment variable $PARROT_GC_DEBUG.) perl -Ilib t/op/basic.t
.pasm
and .pbc
files generated, set the environment variable $POSTMORTEM to 0: env POSTMORTEM=0 perl -Ilib t/op/basic.t
ls t/op/basic*
make test TEST_PROG_ARGS=-P # Use prederef mode
env TEST_PROG_ARGS=-j perl -Ilib t/op/basic.t
make fulltest
|