| |
|
| \g peephole |
\g peephole |
| |
|
| primtable ( -- wprimtable ) new |
|
| ""wprimtable is a table containing the xts of the primitives indexed |
|
| by sequence-number in prim (for use in prepare-peephole-table)."" |
|
| wprimtable = (Cell)primtable(symbols+DOESJUMP+1,MAX_SYMBOLS-DOESJUMP-1); |
|
| |
|
| prepare-peephole-table ( wprimtable -- wpeeptable ) new prepare_peephole_opt |
|
| ""wpeeptable is a data structure used by @code{peephole-opt}; it is |
|
| constructed by combining a primitives table with a simple peephole |
|
| optimization table."" |
|
| wpeeptable = prepare_peephole_table((Xt *)wprimtable); |
|
| |
|
| peephole-opt ( xt1 xt2 wpeeptable -- xt ) new peephole_opt |
|
| ""xt is the combination of xt1 and xt2 (according to wpeeptable); if |
|
| they cannot be combined, xt is 0."" |
|
| xt = peephole_opt(xt1, xt2, wpeeptable); |
|
| |
|
| compile-prim ( xt1 -- xt2 ) obsolete compile_prim |
|
| xt2 = (Xt)compile_prim((Label)xt1); |
|
| |
|
| compile-prim1 ( a_prim -- ) gforth compile_prim1 |
compile-prim1 ( a_prim -- ) gforth compile_prim1 |
| ""compile prim (incl. immargs) at @var{a_prim}"" |
""compile prim (incl. immargs) at @var{a_prim}"" |
| compile_prim1(a_prim); |
compile_prim1(a_prim); |
| decompile-prim ( a_code -- a_prim ) gforth-internal decompile_prim |
decompile-prim ( a_code -- a_prim ) gforth-internal decompile_prim |
| ""a_prim is the code address of the primitive that has been |
""a_prim is the code address of the primitive that has been |
| compile_prim1ed to a_code"" |
compile_prim1ed to a_code"" |
| a_prim = (Label)decompile_code((Label)a_code); |
a_prim = (Cell *)decompile_code((Label)a_code); |
| |
|
| \ set-next-code and call2 do not appear in images and can be |
\ set-next-code and call2 do not appear in images and can be |
| \ renumbered arbitrarily |
\ renumbered arbitrarily |