version 1.176, 2007/03/25 21:30:59
|
version 1.177, 2007/03/31 21:43:18
|
Line 693 int gforth_go(Address image, int stack,
|
Line 693 int gforth_go(Address image, int stack,
|
for(;stack>0;stack--) |
for(;stack>0;stack--) |
*--sp0=entries[stack-1]; |
*--sp0=entries[stack-1]; |
|
|
#ifdef SYSSIGNALS |
#if defined(SYSSIGNALS) && !defined(STANDALONE) |
get_winsize(); |
get_winsize(); |
|
|
install_signal_handlers(); /* right place? */ |
install_signal_handlers(); /* right place? */ |
Line 729 int gforth_go(Address image, int stack,
|
Line 729 int gforth_go(Address image, int stack,
|
return((int)(Cell)gforth_engine(ip0,sp0,rp0,fp0,lp0)); |
return((int)(Cell)gforth_engine(ip0,sp0,rp0,fp0,lp0)); |
} |
} |
|
|
#ifndef INCLUDE_IMAGE |
#if !defined(INCLUDE_IMAGE) && !defined(STANDALONE) |
static void print_sizes(Cell sizebyte) |
static void print_sizes(Cell sizebyte) |
/* print size information */ |
/* print size information */ |
{ |
{ |
Line 1105 static Address append_prim(Cell p)
|
Line 1105 static Address append_prim(Cell p)
|
} |
} |
#endif |
#endif |
|
|
#ifdef STANDALONE |
|
Address gforth_alloc(Cell size) |
|
{ |
|
Address r; |
|
/* leave a little room (64B) for stack underflows */ |
|
if ((r = malloc(size+64))==NULL) { |
|
perror(progname); |
|
exit(1); |
|
} |
|
r = (Address)((((Cell)r)+(sizeof(Float)-1))&(-sizeof(Float))); |
|
debugp(stderr, "malloc succeeds, address=$%lx\n", (long)r); |
|
return r; |
|
} |
|
#endif |
|
|
|
int forget_dyncode(Address code) |
int forget_dyncode(Address code) |
{ |
{ |
#ifdef NO_DYNAMIC |
#ifdef NO_DYNAMIC |
Line 1942 static FILE * open_image_file(char * ima
|
Line 1927 static FILE * open_image_file(char * ima
|
} |
} |
#endif |
#endif |
|
|
|
#ifdef STANDALONE |
|
Address gforth_alloc(Cell size) |
|
{ |
|
Address r; |
|
/* leave a little room (64B) for stack underflows */ |
|
if ((r = malloc(size+64))==NULL) { |
|
perror(progname); |
|
exit(1); |
|
} |
|
r = (Address)((((Cell)r)+(sizeof(Float)-1))&(-sizeof(Float))); |
|
debugp(stderr, "malloc succeeds, address=$%lx\n", (long)r); |
|
return r; |
|
} |
|
#endif |
|
|
#ifdef HAS_OS |
#ifdef HAS_OS |
static UCell convsize(char *s, UCell elemsize) |
static UCell convsize(char *s, UCell elemsize) |
/* converts s of the format [0-9]+[bekMGT]? (e.g. 25k) into the number |
/* converts s of the format [0-9]+[bekMGT]? (e.g. 25k) into the number |
Line 2263 int main(int argc, char **argv, char **e
|
Line 2263 int main(int argc, char **argv, char **e
|
if (print_metrics) { |
if (print_metrics) { |
int i; |
int i; |
fprintf(stderr, "code size = %8ld\n", dyncodesize()); |
fprintf(stderr, "code size = %8ld\n", dyncodesize()); |
|
#ifndef STANDALONE |
for (i=0; i<sizeof(cost_sums)/sizeof(cost_sums[0]); i++) |
for (i=0; i<sizeof(cost_sums)/sizeof(cost_sums[0]); i++) |
fprintf(stderr, "metric %8s: %8ld\n", |
fprintf(stderr, "metric %8s: %8ld\n", |
cost_sums[i].metricname, cost_sums[i].sum); |
cost_sums[i].metricname, cost_sums[i].sum); |
|
#endif |
fprintf(stderr,"lb_basic_blocks = %ld\n", lb_basic_blocks); |
fprintf(stderr,"lb_basic_blocks = %ld\n", lb_basic_blocks); |
fprintf(stderr,"lb_labeler_steps = %ld\n", lb_labeler_steps); |
fprintf(stderr,"lb_labeler_steps = %ld\n", lb_labeler_steps); |
fprintf(stderr,"lb_labeler_automaton = %ld\n", lb_labeler_automaton); |
fprintf(stderr,"lb_labeler_automaton = %ld\n", lb_labeler_automaton); |