The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

IMCC - running

VERSION

0.1 initial
0.0.9.10 changed run options
0.0.9.12 changed debug options

OVERVIEW

This document describes imcc's command line options.

SYNOPSIS

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

OPTIONS

Imcc options

-a, --pasm

Assume PASM input on stdin.

-c, --pbc

Assume PBC file on stdin, run it.

-d, --debug [hexbits]

Tbe -d switch takes an optional argument, which is considered to hold a hex value of debug bits. Without a value, debug is set to 1.

The individual bits are:

 DEBUG_PARROT 0x0001
 DEBUG_LEXER  0x0002
 DEBUG_PARSER 0x0004
 DEBUG_IMC    0x0008
 DEBUG_CFG    0x0010
 DEBUG_OPT1   0x0020
 DEBUG_OPT2   0x0040
 DEBUG_PBC    0x1000
 DEBUG_PBC_CONST    0x2000
 DEBUG_PBC_FIXUP    0x4000

To produce really huge output on stderr run "imcc -d 0ffff ...". Note: if the argument is separated by whitespace from the -d switch, it has to start with a number.

-h --help
-o outputfile

Act like assembler. Don't run code, except -r is given too. If the outputfile ends with .pbc a PBC file is written. If it ends with .pasm a PASM output is generated, even from PASM input. This canbe handy to check various optimizations including -Op.

-r, --run-pbc
-v, --verbose

One -v shows, which files are worked on, two give you a summary over register usage and optimization stats perl compilation unit.

-y, --yydebug

Turn on yydebug in yacc/bison.

-V, --version
-Ox

Optimize

 -O0 no opimization (default)
 -O1 optimizations w/o life info (e.g. branches)
 -O2 optimizations with life info
 -Op rewrite I and N PASM registers most used first

This will probably change.

Parrot Options

s. parrot -h for description, used, when running a program inside imcc.

<file>

If the file ends in .pbc it will be interpreted immediately. If the file ends in .pasm it is parsed as PASM code else as PIR code then it get's run, except -o was given. If the file is a single dash, input from stdin is read.

Generated files

If debugging is enabled these files are generated:

  file.stabs.s ... stabsfile for the program
  file.o ... object file with debug information
  EVAL_n ... source of B<compile> op nr. I<N>
  EVAL_n.stabs.s ... stabsfile for this block
  EVAL_n.o ... object file with debug information

[arguments ...]

Optional arguments passed to the running program as ARGV, only useful for running the program.

Operation table

 Commandline            Action          Output
 ---------------------------------------------
 imcc x.imc             run
 imcc x.pasm            run
 imcc x.pbc             run
 -o x.pasm x.imc        ass             x.pasm
 -o x.pasm y.pasm       ass             x.pasm
 -o x.pbc  x.imc        ass             x.pbc
 -o x.pbc  x.pasm       ass             x.pbc
 -o x.pbc -r x.pasm     ass/run         x.pbc

BUGS

The long imcc options are unimplemented.

FILES

main.c

AUTHOR

Leopold Toetsch <lt@toetsch.at>

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 29:

'=item' outside of any '=over'

Around line 92:

You forgot a '=back' before '=head2'