| Address code_area=0; |
Address code_area=0; |
| Address code_here=0; /* does for code-area what HERE does for the dictionary */ |
Address code_here=0; /* does for code-area what HERE does for the dictionary */ |
| |
|
| |
static int no_super=0; /* true if compile_prim should not fuse prims */ |
| |
static int no_dynamic=0; /* true if compile_prim should not generate code */ |
| |
|
| #ifdef HAS_DEBUG |
#ifdef HAS_DEBUG |
| static int debug=0; |
static int debug=0; |
| #else |
#else |
| int prim_len=symbols1[i+1]-symbols1[i]; |
int prim_len=symbols1[i+1]-symbols1[i]; |
| PrimInfo *pi=&priminfos[i]; |
PrimInfo *pi=&priminfos[i]; |
| int j; |
int j; |
| pi->super_end = superend[i-DOESJUMP-1]; |
pi->super_end = superend[i-DOESJUMP-1]|no_super; |
| for (j=prim_len-IND_JUMP_LENGTH; ; j--) { |
for (j=prim_len-IND_JUMP_LENGTH; ; j--) { |
| if (IS_NEXT_JUMP(symbols1[i]+j)) { |
if (IS_NEXT_JUMP(symbols1[i]+j)) { |
| prim_len = j; |
prim_len = j; |
| pi->length = prim_len; |
pi->length = prim_len; |
| /* fprintf(stderr,"checking primitive %d: memcmp(%p, %p, %d)\n", |
/* fprintf(stderr,"checking primitive %d: memcmp(%p, %p, %d)\n", |
| i, symbols1[i], symbols2[i], prim_len);*/ |
i, symbols1[i], symbols2[i], prim_len);*/ |
| if (memcmp(symbols1[i],symbols2[i],prim_len)!=0) { |
if (no_dynamic||memcmp(symbols1[i],symbols2[i],prim_len)!=0) { |
| if (debug) |
if (debug) |
| fprintf(stderr,"Primitive %d not relocatable: memcmp(%p, %p, %d)\n", |
fprintf(stderr,"Primitive %d not relocatable: memcmp(%p, %p, %d)\n", |
| i, symbols1[i], symbols2[i], prim_len); |
i, symbols1[i], symbols2[i], prim_len); |
| {"clear-dictionary", no_argument, &clear_dictionary, 1}, |
{"clear-dictionary", no_argument, &clear_dictionary, 1}, |
| {"die-on-signal", no_argument, &die_on_signal, 1}, |
{"die-on-signal", no_argument, &die_on_signal, 1}, |
| {"debug", no_argument, &debug, 1}, |
{"debug", no_argument, &debug, 1}, |
| |
{"no-super", no_argument, &no_super, 1}, |
| |
{"no-dynamic", no_argument, &no_dynamic, 1}, |
| {0,0,0,0} |
{0,0,0,0} |
| /* no-init-file, no-rc? */ |
/* no-init-file, no-rc? */ |
| }; |
}; |
| -i FILE, --image-file=FILE Use image FILE instead of `gforth.fi'\n\ |
-i FILE, --image-file=FILE Use image FILE instead of `gforth.fi'\n\ |
| -l SIZE, --locals-stack-size=SIZE Specify locals stack size\n\ |
-l SIZE, --locals-stack-size=SIZE Specify locals stack size\n\ |
| -m SIZE, --dictionary-size=SIZE Specify Forth dictionary size\n\ |
-m SIZE, --dictionary-size=SIZE Specify Forth dictionary size\n\ |
| |
--no-dynamic Use only statically compiled primitives\n\ |
| --no-offset-im Load image at normal position\n\ |
--no-offset-im Load image at normal position\n\ |
| |
--no-super No dynamically formed superinstructions\n\ |
| --offset-image Load image at a different position\n\ |
--offset-image Load image at a different position\n\ |
| -p PATH, --path=PATH Search path for finding image and sources\n\ |
-p PATH, --path=PATH Search path for finding image and sources\n\ |
| -r SIZE, --return-stack-size=SIZE Specify return stack size\n\ |
-r SIZE, --return-stack-size=SIZE Specify return stack size\n\ |