This is a summary of PIR directives. Directives are preprocessed by the Parrot interpreter. Since PIR and PASM run on the same interpreter, many of the directives listed here are also valid in PASM code.
.arg R<VAL>
pass a value to a subroutine according to PCC.
.const R<TYPE>R<NAME> = R<VALUE>
Define a named constant.
.macro_const R<NAME>R<VALUE>
Define a named macro that expands to a given value. Macros are called as directives, i.e. .NAME (PASM code only).
.emit
Define a block of PASM code. Always paired with .eom.
.eom
.end
End a subroutine. Always paired with .sub.
.sub
.endm
End a macro definition. Always paired with .macro.
.macro
End a block of PASM code. Always paired with .emit.
.flatten_arg R<PArray>
Flatten the passed array PMC and provide args for PCC calls.
.globalconst R<TYPE>R<NAME> = R<VALUE>
Define a named, file visible constant.
.include " R<FILENAME> "
Include the contents of an external file by inserting it in place.
.invocant R<OBJ>
Set the invocant for a method call.
.local R<TYPE>R<NAME>
Define a local named variable.
.macro R<NAME> (R<PARAMS>)
Define a named macro with a list of parameters. The macro is called as .NAME(arg1,arg2,...). Always paired with .endm.
.namespace R< [ "namespace" ] >
Define a namespace.
.param R<DEST> .param R<TYPE>R<NAME>
Define a subroutine parameter.
Start a call sequence. Always paired with .end_call
.end_call
Start a return sequence. Always paired with .end_return
.end_return
Start a return of a coroutine sequence. Always paired with .end_yield
.end_yield
.call R<SUB> .call R<SUB>, R<RETCONT>
Create a subroutine call.
.pcc_sub R<_LABEL>
Create a symbol entry for subroutine at the _LABEL. This directive is for PASM code only.
.result R<DEST>
Get a return value according to PCC.
.return R<VAL>
Return a value to the calling subroutine according to PCC.
.sub R<NAME>
Define a subroutine. Always paired with .end. Names begin with "_" by convention.
_
.sym R<TYPE> R<NAME>
Same as .local.
.local
3 POD Errors
The following errors were encountered while parsing the POD:
A non-empty Z<>
Deleting unknown formatting code R<>
To install Rakudo::Star, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rakudo::Star
CPAN shell
perl -MCPAN -e shell install Rakudo::Star
For more information on module installation, please visit the detailed CPAN module installation guide.