parrotcode: compilers/imcc/pbc.c | |
Contents | Compilers |
compilers/imcc/pbc.c
emit imcc instructions into Parrot interpreter
the e_pbc_emit function is called per instruction
Notes:
I'm using existing data structures here (SymReg*) to store various global items (currently only PMC constants). The index in the constant table is in SymReg* ->color data member. This looks odd, but the register number from imc.c:allocate is also there for variables, so it's a little bit consistent at least.
So when reading color here it's either a constant table index or a Parrot register number, depending on data type.
TODO memory clean up
-lt
static void imcc_globals_destroy
int e_pbc_open
static int old_blocks
opcode_t *make_jit_info
static void make_new_sub
static int get_old_size
static void store_sub_size
static void store_fixup
static void store_key_const
static int get_codesize
static subs_t *find_global_label
static void fixup_globals
STRING *IMCC_string_from_reg
static int add_const_str
static int add_const_num
static PMC *mk_multi_sig
static PMC *create_lexinfo
static PMC *find_outer
static int add_const_pmc_sub
static int add_const_key
static const char *slice_deb
static opcode_t build_key
INTVAL IMCC_int_from_reg
static void make_pmc_const
static void add_1_const
static void constant_folding
int e_pbc_new_sub
int e_pbc_end_sub
static void verify_signature
- check if any get_ argument contains constants
- fill in type bits for argument types and constants, if missing
int e_pbc_emit
int e_pbc_close
|