commit 32affb5f76e5c0388dcf1fb22d0b06cac334d4a2
parent 52ac83e0060ece30f0e3f3a454b2045ab92f9876
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Sun, 2 Apr 2023 10:08:02 -0400
halcc: remove spurious push-to-PS
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/comp/c/expr.fs b/fs/comp/c/expr.fs
@@ -37,7 +37,9 @@ struct[ Result
: :const ( n -- res ) CONST :new ;
: :W ( -- res ) :Wfree# 0 W :new dup to currentW ;
: :isW? ( self -- f ) type W = ;
- : :hasW? ( self -- f ) dup target ?dup if nip :hasW? else :isW? then ;
+ : :hasW? ( self -- f )
+ dup :isW? if drop 1 else
+ dup target ?dup if nip :hasW? else :isW? then then ;
: :release ( self -- ) dup :isW? if 0 to currentW then NONE swap to type ;
: :>PS
dup :isW? _assert dup :release