======================================== * Remove _then noop overhead for win32forth v4.2 0671. (by Lcc Wizard) * Save about 5k space on win32for.img (1 cell per IF THEN), and lessen IF THEN overhead. \ NCODE _THEN ( -- ) \ "runtime" marker for the decompiler, a noop \ next c; ======================================== \ meta.f: \ * replace then with: T: THEN ?>RESOLVE T; ======================================== \ fkernel.f: \ * replace then with: : THEN ?COMP 2 ?PAIRS >RESOLVE ; IMMEDIATE ======================================== \ see.f \ * add: : stk ( stack-size -- ) create here , cells allot ; : xpush ( n stack -- ) 1 cells over +! @ ! ; : xpop ( stack -- n ) dup @ @ 1 cells negate rot +! ; : xdrop ( stack -- n ) xpop drop ; : xdepth ( stack -- n ) dup @ - negate 1 cells / ; 16 stk .then-stk \ * modify: : .execution-class ( ip cfa -- ip' ) ...... ['] ?branch of d_cr ." IF " +tab cell+ dup @ over + \ ." then addr=" dup . .then-stk xpush cell+ endof ['] branch of -tab d_cr ." ELSE " +tab cell+ dup @ over + \ ." then addr=" dup . .then-stk xdrop .then-stk xpush cell+ endof ..... ; : .PFA ( cfa -- ) .then-stk dup ! tabing-on 0TAB +TAB tab BEGIN .then-stk xdepth 0 ?do .then-stk xpop >r dup @ ['] branch <> over r@ >= and if -tab d_cr ." THEN " r> drop else r> .then-stk xpush leave then loop 14 ?line DUP @ .EXECUTION-CLASS DUP 0= nuf? or UNTIL DROP tabing-off ;