Matt S Trout > Rakudo-Star-2012.08_001 > compilers/imcc/imcc.y


Annotate this POD



compilers/imcc/imcc.y - Intermediate Code Compiler for Parrot.


This file contains the grammar of the PIR language parser.

static Instruction * MK_I(imc_info_t *imcc, IMC_Unit *unit, const char *fmt, int n, ...)

build and emitb instruction by INS. fmt may contain:

  op %s, %s # comment

or just


NOTE: Most usage of this function is with imcc->cur_unit, but there are some exceptions. Thus, we can't easily factorize that piece of code.

static Instruction* mk_pmc_const_named(imc_info_t *imcc, IMC_Unit *unit, const char *name, SymReg *left, const char *constant)
static Instruction* func_ins(imc_info_t *imcc, IMC_Unit *unit, SymReg *lhs, const char *op, SymReg **r, int n, int keyv, int emit)
static void clear_state(imc_info_t *imcc)
Instruction * INS_LABEL(imc_info_t *imcc, IMC_Unit *unit, SymReg *r0, int emit)
static Instruction * iLABEL(imc_info_t *imcc, IMC_Unit *unit, SymReg *r0)
static Instruction * iSUBROUTINE(imc_info_t *imcc, IMC_Unit *unit, SymReg *r)
static Instruction * iINDEXFETCH(imc_info_t *imcc, IMC_Unit *unit, SymReg *r0, SymReg *r1, SymReg *r2)

substr or X = P[key]

static Instruction * iINDEXSET(imc_info_t *imcc, IMC_Unit *unit, SymReg *r0, SymReg *r1, SymReg *r2)

substr or P[key] = X

static const char * inv_op(const char *op)
Instruction * IMCC_create_itcall_label(imc_info_t *imcc)
static SymReg * mk_sub_address_fromc(imc_info_t *imcc, const char *name)
static SymReg * mk_sub_address_u(imc_info_t *imcc, const char *name)
void IMCC_itcall_sub(imc_info_t *imcc, SymReg *sub)
static void begin_return_or_yield(imc_info_t *imcc, int yield)
static void set_lexical(imc_info_t *imcc, SymReg *r, SymReg *name)
static void add_pcc_named_arg(imc_info_t *imcc, SymReg *cur_call, SymReg *name, SymReg *value)
static void add_pcc_named_arg_var(imc_info_t *imcc, SymReg *cur_call, SymReg *name, SymReg *value)
static void add_pcc_named_result(imc_info_t *imcc, SymReg *cur_call, SymReg *name, SymReg *value)
static void add_pcc_named_param(imc_info_t *imcc, SymReg *cur_call, SymReg *name, SymReg *value)
static void add_pcc_named_return(imc_info_t *imcc, SymReg *cur_call, SymReg *name, SymReg *value)
static void adv_named_set(imc_info_t *imcc, const char *name)
static void adv_named_set_u(imc_info_t *imcc, const char *name)

Sets the name of the current named argument.

adv_named_set_u is the Unicode version of this function.

static void do_loadlib(imc_info_t *imcc, const char *lib)
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
syntax highlighting: