version 1.133, 2003/11/09 11:45:33
|
version 1.134, 2003/11/09 11:51:55
|
Line 1067 Address compile_prim1arg(PrimNum p, Cell
|
Line 1067 Address compile_prim1arg(PrimNum p, Cell
|
return old_code_here; |
return old_code_here; |
} |
} |
|
|
Cell *compile_call2(Cell targetptr) |
Address compile_call2(Cell targetptr, Cell **next_code_targetp) |
{ |
{ |
Cell *next_code_target; |
|
PrimInfo *pi = &priminfos[N_call2]; |
PrimInfo *pi = &priminfos[N_call2]; |
Address old_code_here = append_prim(N_call2); |
Address old_code_here = append_prim(N_call2); |
|
|
next_code_target = (Cell *)(old_code_here + pi->immargs[0].offset); |
*next_code_targetp = (Cell *)(old_code_here + pi->immargs[0].offset); |
register_branchinfo(old_code_here + pi->immargs[1].offset, targetptr); |
register_branchinfo(old_code_here + pi->immargs[1].offset, targetptr); |
return next_code_target; |
return old_code_here; |
} |
} |
#endif |
#endif |
|
|
Line 1114 Cell compile_prim_dyn(PrimNum p, Cell *t
|
Line 1113 Cell compile_prim_dyn(PrimNum p, Cell *t
|
|
|
assert(p<npriminfos); |
assert(p<npriminfos); |
if (p==N_execute || p==N_perform || p==N_lit_perform) { |
if (p==N_execute || p==N_perform || p==N_lit_perform) { |
codeaddr = (Cell)compile_prim1arg(N_set_next_code, &next_code_target); |
codeaddr = compile_prim1arg(N_set_next_code, &next_code_target); |
} |
} |
if (p==N_call) { |
if (p==N_call) { |
next_code_target = compile_call2(tcp[1]); |
codeaddr = compile_call2(tcp[1], &next_code_target); |
} else if (p==N_does_exec) { |
} else if (p==N_does_exec) { |
struct doesexecinfo *dei = &doesexecinfos[ndoesexecinfos++]; |
struct doesexecinfo *dei = &doesexecinfos[ndoesexecinfos++]; |
Cell *arg; |
Cell *arg; |
Line 1129 Cell compile_prim_dyn(PrimNum p, Cell *t
|
Line 1128 Cell compile_prim_dyn(PrimNum p, Cell *t
|
branches */ |
branches */ |
dei->branchinfo = nbranchinfos; |
dei->branchinfo = nbranchinfos; |
dei->xt = (Cell *)(tcp[1]); |
dei->xt = (Cell *)(tcp[1]); |
next_code_target = compile_call2(0); |
compile_call2(0, &next_code_target); |
} else if (!is_relocatable(p)) { |
} else if (!is_relocatable(p)) { |
Cell *branch_target; |
Cell *branch_target; |
codeaddr = compile_prim1arg(N_set_next_code, &next_code_target); |
codeaddr = compile_prim1arg(N_set_next_code, &next_code_target); |