line: refactors %elf

This commit is contained in:
Joe Bryan 2024-07-22 15:43:45 -04:00
parent 6b8b626b6c
commit bae6965531

View File

@ -463,26 +463,19 @@
==
::
%elf
?- -.goal
%done
=^ last gen rain
=^ deft gen (emit ~ ~ %don last)
$(goal [%next [%this last] deft])
::
%pick
=^ flip gen rain
=^ heft gen (emit ~ ~ %brn flip [zero once]:goal)
$(goal [%next [%this flip] heft])
::
%next
=^ [weft=@uwoo good=@uvre] gen (kerf goal)
=^ home gen rain
=^ path gen rain
=^ show gen (emit ~ ~ %spy home path good weft)
=^ trot gen $(n walk.n, goal [%next [%this path] show])
=^ paid gen $(n rent.n, goal [%next [%this home] then.trot])
(copy paid what.trot)
==
=> =* dot .
?: ?=(%next -.goal) dot
=^ reg gen rain
=/ sit ?:(?=(%done -.goal) [%don reg] [%brn reg |2.goal])
=^ uwo gen (emit ~ ~ sit)
dot(goal [%next [%this reg] uwo])
=^ [weft=@uwoo good=@uvre] gen (kerf goal)
=^ home gen rain
=^ path gen rain
=^ show gen (emit ~ ~ %spy home path good weft)
=^ trot gen $(n walk.n, goal [%next [%this path] show])
=^ paid gen $(n rent.n, goal [%next [%this home] then.trot])
(copy paid what.trot)
==
::
:: redo callsite registerization