version 1.76, 2002/12/13 21:20:40
|
version 1.77, 2002/12/13 21:59:39
|
Line 432 int go_forth(Address image, int stack, C
|
Line 432 int go_forth(Address image, int stack, C
|
return((int)(Cell)engine(ip0,sp0,rp0,fp0,lp0)); |
return((int)(Cell)engine(ip0,sp0,rp0,fp0,lp0)); |
} |
} |
|
|
|
|
#ifndef INCLUDE_IMAGE |
#ifndef INCLUDE_IMAGE |
void print_sizes(Cell sizebyte) |
void print_sizes(Cell sizebyte) |
/* print size information */ |
/* print size information */ |
Line 467 PrimInfo **decomp_prims;
|
Line 466 PrimInfo **decomp_prims;
|
|
|
int compare_priminfo_length(PrimInfo **a, PrimInfo **b) |
int compare_priminfo_length(PrimInfo **a, PrimInfo **b) |
{ |
{ |
return (*a)->length - (*b)->length; |
Cell diff = (*a)->length - (*b)->length; |
|
if (diff) |
|
return diff; |
|
else /* break ties by start address; thus the decompiler produces |
|
the earliest primitive with the same code (e.g. noop instead |
|
of (char) and @ instead of >code-address */ |
|
return (*b)->start - (*a)->start; |
} |
} |
|
|
#endif /* defined(NO_DYNAMIC) */ |
#endif /* defined(NO_DYNAMIC) */ |
Line 658 Label decompile_code(Label code)
|
Line 663 Label decompile_code(Label code)
|
return code; |
return code; |
#else /* !defined(NO_DYNAMIC) */ |
#else /* !defined(NO_DYNAMIC) */ |
Cell i; |
Cell i; |
|
struct code_block_list *p; |
|
|
|
/* first, check if we are in code at all */ |
|
for (p = code_block_list;; p = p->next) { |
|
if (p == NULL) |
|
return code; |
|
if (code >= p->block && code < p->block+p->size) |
|
break; |
|
} |
/* reverse order because NOOP might match other prims */ |
/* reverse order because NOOP might match other prims */ |
for (i=npriminfos-1; i>DOESJUMP; i--) { |
for (i=npriminfos-1; i>DOESJUMP; i--) { |
PrimInfo *pi=decomp_prims[i]; |
PrimInfo *pi=decomp_prims[i]; |