--- gforth/engine/main.c 2003/11/09 11:35:23 1.132 +++ gforth/engine/main.c 2003/11/09 11:45:33 1.133 @@ -1058,13 +1058,13 @@ void register_branchinfo(Label source, C nbranchinfos++; } -Cell *compile_prim1arg(PrimNum p) +Address compile_prim1arg(PrimNum p, Cell **argp) { - Address old_code_here=code_here; + Address old_code_here=append_prim(p); assert(vm_prims[p]==priminfos[p].start); - append_prim(p); - return (Cell*)(old_code_here+priminfos[p].immargs[0].offset); + *argp = (Cell*)(old_code_here+priminfos[p].immargs[0].offset); + return old_code_here; } Cell *compile_call2(Cell targetptr) @@ -1114,13 +1114,15 @@ Cell compile_prim_dyn(PrimNum p, Cell *t assert(pxt = (Cell *)(tcp[1]); next_code_target = compile_call2(0); } else if (!is_relocatable(p)) { - next_code_target = compile_prim1arg(N_set_next_code); - set_rel_target(compile_prim1arg(N_branch),vm_prims[p]); + Cell *branch_target; + codeaddr = compile_prim1arg(N_set_next_code, &next_code_target); + compile_prim1arg(N_branch,&branch_target); + set_rel_target(branch_target,vm_prims[p]); } else { unsigned j; Address old_code_here = append_prim(p);