NAME ^

compilers/imcc/pcc.c

DESCRIPTION ^

Parrot calling convention implementation.

see: docs/pdds/pdd03_calling_conventions.pod

PCC Implementation by Leopold Toetsch

Functions ^

PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL static Instruction *insINS(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins), ARGIN(const char *name), NOTNULL(SymReg **regs), int n)

Utility instruction routine. Creates and inserts an instruction into the current block in one call.

PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL SymReg *get_pasm_reg(PARROT_INTERP, ARGIN(const char *name))

get or create the SymReg

PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL SymReg *get_const(PARROT_INTERP, ARGIN(const char *name), int type)

get or create a constant

PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL static Instruction *pcc_get_args(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins), ARGIN(const char *op_name), int n, NULLOK(SymReg **args), ARGIN_NULLOK(const int *arg_flags))

set arguments or return values get params or results used by expand_pcc_sub_call and expand_pcc_sub

static void unshift_self(NOTNULL(SymReg *sub), NOTNULL(SymReg *obj))

prepend the object to args or self to params

void expand_pcc_sub(PARROT_INTERP, NOTNULL(NOTNULL(IMC_Unit *unit)), NOTNULL(NOTNULL(Instruction *ins)))

Expand a PCC (Parrot Calling Convention) subroutine by generating the appropriate prologue and epilogue for parameter passing/returning.

void expand_pcc_sub_ret(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins))

Expand a PCC sub return directive into its PASM instructions

static int pcc_reg_mov(PARROT_INTERP, unsigned char d, unsigned char s, NOTNULL(void *vinfo))

RT#48260: Not yet documented!!!

PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static Instruction *move_regs(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins), int n, NOTNULL(SymReg **dest), NOTNULL(SymReg **src))

RT#48260: Not yet documented!!!

static int recursive_tail_call(PARROT_INTERP, NOTNULL(NOTNULL(IMC_Unit *unit)), NOTNULL(NOTNULL(Instruction *ins)), NOTNULL(SymReg *sub))

convert a recursive tailcall into a loop

static void insert_tail_call(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(NOTNULL(Instruction *ins)), NOTNULL(SymReg *sub), NULLOK(SymReg *meth))

RT#48260: Not yet documented!!!

void expand_pcc_sub_call(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins))

Expand a PCC subroutine call (IMC) into its PASM instructions This is the nuts and bolts of pdd03 routine call style


parrot