--- gforth/kernel/cond.fs 2002/02/04 21:25:18 1.12 +++ gforth/kernel/cond.fs 2002/09/24 17:57:29 1.13 @@ -110,9 +110,9 @@ variable backedge-locals : >mark ( -- orig ) cs-push-orig 0 , ; : >resolve ( addr -- ) - here over - swap ! + here swap ! basic-block-end ; -: mark POSTPONE unreachable ; immediate restrict + POSTPONE abranch >mark POSTPONE unreachable ; immediate restrict : IF ( compilation -- orig ; run-time f -- ) \ core - POSTPONE ?branch >mark ; immediate restrict + POSTPONE a?branch >mark ; immediate restrict : ?DUP-IF ( compilation -- orig ; run-time n -- n| ) \ gforth question-dupe-if \G This is the preferred alternative to the idiom "@code{?DUP IF}", since it can be \G better handled by tools like stack checkers. Besides, it's faster. - POSTPONE ?dup-?branch >mark ; immediate restrict + POSTPONE a?dup-?branch >mark ; immediate restrict : ?DUP-0=-IF ( compilation -- orig ; run-time n -- n| ) \ gforth question-dupe-zero-equals-if - POSTPONE ?dup-0=-?branch >mark ; immediate restrict + POSTPONE a?dup-0=-?branch >mark ; immediate restrict Defer then-like ( orig -- ) : cs>addr ( orig/dest -- ) drop >resolve drop ; @@ -164,7 +164,7 @@ Defer again-like ( dest -- addr ) ' nip IS again-like : AGAIN ( compilation dest -- ; run-time -- ) \ core-ext - dest? again-like POSTPONE branch