O'Reilly logo

Perl 6 Essentials by Leopold Tötsch, Dan Sugalski, Allison Randal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

IMCC Command-Line Options

Since IMCC is both an assembler and a Parrot bytecode interpreter, it has options to control both behaviors. Some options may have changed by the time you read this, especially options related to debugging and optimization. The document languages/imcc/docs/running.pod should have the latest details.

General Usage

imcc [options] file [arguments]

The file is either an .imc or .pasm source file or a Parrot bytecode file. Parrot creates a PerlArray object to hold the command-line arguments and stores it in P0 on program start.

Assembler Options

-a, --pasm

Assume PASM input on stdin. When IMCC runs a source file with a .pasm extension, it parses the file as pure PASM code. This switch turns on PASM parsing (instead of the default PIR parsing) when a source file is read from stdin.

-c,--pbc

Assume PBC file on stdin. When IMCC runs a bytecode file with a .pbc extension, it immediately executes the file. This option tells IMCC to immediately execute a bytecode file piped in on stdin.

-d,--debug [ hexbits ]

Turn on debugging output. The -d switch takes an optional argument, which is a hex value of debug bits. The individual bits are shown in Table 7-1. When hexbits isn’t specified, the default debugging level is 0001. If the hexbits is separated from the -d switch by whitespace, it has to start with a number.

Table 7-1. Debug bits

Description

Debug bit

DEBUG_PARROT

0001

DEBUG_LEXER

0002

DEBUG_PARSER

0004

DEBUG_IMC

0008

DEBUG_CFG

0010

DEBUG_OPT1

0020

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required