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.
Push a value onto the user stack or set it according to PCC.
Define a named constant.
Define a named macro that expands to a given value. Macros are called as directivesi.e., . NAME (PASM code only).
Define a compilation unit of PASM code. Always paired with .eom .
End a compilation unit. Always paired with .sub .
End a macro definition. Always paired with .macro .
End a compilation unit of PASM code. Always paired with .emit .
Flatten the passed array PMC and provide args for PCC calls.
.globalconst TYPENAME = VALUE |
Define a named, file visible constant.
Include the contents of an external file by inserting it in place.
Set the invocant for a method call.
Define a local named variable.
Define a named macro with a list of parameters. The macro is called as:
. NAME ( arg1 , arg2 , . . . )
This directive is always paired with .endm .
.meth_call SUB .meth_call SUB , RETCONT |
Create a method call.
.namespace [ "namespace" ] |
Define a namespace.
Create an NCI call.
.param DEST .param TYPENAME |
Pop a value off the user stack into a register or typed identifier.
Start a call sequence. Always paired with .pcc_end .
Start a return sequence. Always paired with .pcc_end_return .
Start a return of a coroutine sequence. Always paired with .pcc_end_yield .
.pcc_call SUB .pcc_call SUB , RETCONT |
Create a subroutine call.
Create a symbol entry for subroutine at the _LABEL. This directive is for PASM code only.
.pragma fastcall .pragma prototyped |
Set default calling conventions.
Pop a value off the user stack or get it according to PCC.
Return a value to the calling subroutine by pushing it onto the user stack or set it according to PCC.
Define a compilation unit. Always paired with .end . Names begin with _ by convention.
Same as .local .