| case CF(DOUSER) : |
case CF(DOUSER) : |
| case CF(DODEFER) : |
case CF(DODEFER) : |
| case CF(DOFIELD) : MAKE_CF(image+i,symbols[CF(token)]); break; |
case CF(DOFIELD) : MAKE_CF(image+i,symbols[CF(token)]); break; |
| case CF(DOESJUMP): MAKE_DOES_HANDLER(image+i); break; |
case CF(DOESJUMP): image[i]=0; break; |
| #endif /* !defined(DOUBLY_INDIRECT) */ |
#endif /* !defined(DOUBLY_INDIRECT) */ |
| case CF(DODOES) : |
case CF(DODOES) : |
| MAKE_DOES_CF(image+i,(Xt *)(image[i+1]+((Cell)start))); |
MAKE_DOES_CF(image+i,(Xt *)(image[i+1]+((Cell)start))); |
| #endif |
#endif |
| } |
} |
| |
|
| #ifndef NO_DYNAMIC |
|
| void flush_to_here(void) |
void flush_to_here(void) |
| { |
{ |
| |
#ifndef NO_DYNAMIC |
| FLUSH_ICACHE(start_flush, code_here-start_flush); |
FLUSH_ICACHE(start_flush, code_here-start_flush); |
| start_flush=code_here; |
start_flush=code_here; |
| |
#endif |
| } |
} |
| |
|
| |
#ifndef NO_DYNAMIC |
| void append_jump(void) |
void append_jump(void) |
| { |
{ |
| if (last_jump) { |
if (last_jump) { |
| memcpy(code_here, pi->start+pi->length, pi->restlength); |
memcpy(code_here, pi->start+pi->length, pi->restlength); |
| code_here += pi->restlength; |
code_here += pi->restlength; |
| last_jump=0; |
last_jump=0; |
| flush_to_here(); |
|
| } |
} |
| } |
} |
| |
|
| if (code_area+code_area_size < code_here+pi->length+pi->restlength) { |
if (code_area+code_area_size < code_here+pi->length+pi->restlength) { |
| struct code_block_list *p; |
struct code_block_list *p; |
| append_jump(); |
append_jump(); |
| |
flush_to_here(); |
| if (*next_code_blockp == NULL) { |
if (*next_code_blockp == NULL) { |
| code_here = start_flush = code_area = my_alloc(code_area_size); |
code_here = start_flush = code_area = my_alloc(code_area_size); |
| p = (struct code_block_list *)malloc(sizeof(struct code_block_list)); |
p = (struct code_block_list *)malloc(sizeof(struct code_block_list)); |
| } |
} |
| memcpy(code_here, pi->start, pi->length); |
memcpy(code_here, pi->start, pi->length); |
| code_here += pi->length; |
code_here += pi->length; |
| if (pi->superend) |
|
| flush_to_here(); |
|
| return old_code_here; |
return old_code_here; |
| } |
} |
| #endif |
#endif |
| set_rel_target(bi->addressptr, *(bi->targetptr)); |
set_rel_target(bi->addressptr, *(bi->targetptr)); |
| } |
} |
| nbranchinfos = 0; |
nbranchinfos = 0; |
| FLUSH_ICACHE(start_flush, code_here-start_flush); |
|
| start_flush=code_here; |
|
| #endif |
#endif |
| |
flush_to_here(); |
| } |
} |
| |
|
| void compile_prim1(Cell *start) |
void compile_prim1(Cell *start) |