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.
pass a value to a subroutine according to PCC.
.const R<TYPE>R<NAME> = R<VALUE>
Define a named constant.
Define a named macro that expands to a given value. Macros are called as directives, i.e. .NAME (PASM code only).
Define a block of PASM code. Always paired with
End a subroutine. Always paired with
End a macro definition. Always paired with
End a block of PASM code. Always paired with
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.
Set the invocant for a method call.
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
.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
Start a return sequence. Always paired with
Start a return of a coroutine sequence. Always paired with
.call R<SUB> .call R<SUB>, R<RETCONT>
Create a subroutine call.
Create a symbol entry for subroutine at the _LABEL. This directive is for PASM code only.
Get a return value according to PCC.
Return a value to the calling subroutine according to PCC.
Define a subroutine. Always paired with
.end. Names begin with "
_" by convention.
.sym R<TYPE> R<NAME>