static void fixup_code_block(code_block *compiled) { /* relocate literal table data */ data_fixup(&compiled->relocation); data_fixup(&compiled->literals); relocate_code_block(compiled); }
void factor_vm::fixup_code_block(code_block *compiled, cell data_relocation_base) { /* relocate literal table data */ data_fixup(&compiled->owner,data_relocation_base); data_fixup(&compiled->literals,data_relocation_base); data_fixup(&compiled->relocation,data_relocation_base); relocate_code_block(compiled); }
void fixup_code_block(F_COMPILED *compiled, CELL code_start, CELL literals_start) { /* relocate literal table data */ CELL scan; CELL literal_end = literals_start + compiled->literals_length; data_fixup(&compiled->relocation); for(scan = literals_start; scan < literal_end; scan += CELLS) data_fixup((CELL*)scan); relocate_code_block(compiled,code_start,literals_start); }
void fixup_code_block(F_COMPILED *relocating, CELL code_start, CELL reloc_start, CELL literals_start) { /* relocate literal table data */ CELL scan; CELL literal_end = literals_start + relocating->literals_length; for(scan = literals_start; scan < literal_end; scan += CELLS) data_fixup((CELL*)scan); if(reloc_start != literals_start) relocate_code_block(relocating,code_start,reloc_start,literals_start); }
code_block *factor_vm::compile_inline_cache(fixnum index,cell generic_word_,cell methods_,cell cache_entries_,bool tail_call_p) { gc_root<word> generic_word(generic_word_,this); gc_root<array> methods(methods_,this); gc_root<array> cache_entries(cache_entries_,this); inline_cache_jit jit(generic_word.value(),this); jit.compile_inline_cache(index, generic_word.value(), methods.value(), cache_entries.value(), tail_call_p); code_block *code = jit.to_code_block(); relocate_code_block(code); return code; }