parrotcode: compilers/imcc/instructions.c | |
Contents | Compilers |
compilers/imcc/instructions.c
When generating the code, the instructions of the program are stored in an array.
After the register allocation is resolved, the instructions array is flushed.
These functions operate over this array and its contents.
PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Instruction *_mk_instruction(ARGIN(const char *op), ARGIN(const char *fmt), int n, SymReg **r, int flags)
void imcc_init_tables(PARROT_INTERP)
int ins_reads2(ARGIN(const Instruction *ins), int t)
int ins_writes2(ARGIN(const Instruction *ins), int t)
int instruction_reads(ARGIN(const Instruction *ins), ARGIN(const SymReg *r))
int instruction_writes(ARGIN(const Instruction *ins), ARGIN(const SymReg *r))
int get_branch_regno(ARGIN(const Instruction *ins))
PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL SymReg *get_branch_reg(ARGIN(const Instruction *ins))
PARROT_CAN_RETURN_NULL Instruction *delete_ins(NOTNULL(struct _IMC_Unit *unit), NOTNULL(Instruction *ins), int needs_freeing)
void insert_ins(NOTNULL(struct _IMC_Unit *unit), NULLOK(Instruction *ins), NOTNULL(Instruction *tmp))
void prepend_ins(NOTNULL(struct _IMC_Unit *unit), NULLOK(Instruction *ins), NOTNULL(Instruction *tmp))
void subst_ins(NOTNULL(struct _IMC_Unit *unit), NOTNULL(Instruction *ins), NOTNULL(Instruction *tmp), int needs_freeing)
PARROT_CAN_RETURN_NULL Instruction *move_ins(NOTNULL(struct _IMC_Unit *unit), NOTNULL(Instruction *ins), NOTNULL(Instruction *to))
PARROT_CAN_RETURN_NULL Instruction *emitb(PARROT_INTERP, NULLOK(struct _IMC_Unit *unit), NULLOK(Instruction *i))
void free_ins(NOTNULL(Instruction *ins))
int ins_print(PARROT_INTERP, NOTNULL(FILE *fd), ARGIN(const Instruction *ins))
static int e_file_open(SHIM_INTERP, NOTNULL(void *param))
static int e_file_close(PARROT_INTERP, SHIM(void *param))
static int e_file_emit(PARROT_INTERP, SHIM(void *param), SHIM(IMC_Unit *unit), ARGIN(const Instruction *ins))
PARROT_API int emit_open(PARROT_INTERP, int type, NULLOK(void *param))
PARROT_API int emit_flush(PARROT_INTERP, NULLOK(void *param), NOTNULL(struct _IMC_Unit *unit))
PARROT_API int emit_close(PARROT_INTERP, NULLOK(void *param))
|