mirror of
https://github.com/urbit/ares.git
synced 2024-11-23 00:25:49 +03:00
codegen: compiles, doesn't run properly, is a tangled mess
This commit is contained in:
parent
3435439299
commit
47c28f65c4
@ -1,16 +1,23 @@
|
|||||||
|
:: XX this whole thing is a mess and needs one more rewrite
|
||||||
/- *sock
|
/- *sock
|
||||||
/- *gene
|
/- *gene
|
||||||
/+ ska
|
/+ ska
|
||||||
=| burg=town
|
=| burg=town
|
||||||
|%
|
|%
|
||||||
|
++ vent
|
||||||
|
|= barn
|
||||||
|
[sub for 1 %vent]
|
||||||
|
++ dole
|
||||||
|
|= barn
|
||||||
|
[sub for 1 %dole]
|
||||||
++ mill :: XX todo observe crashes
|
++ mill :: XX todo observe crashes
|
||||||
=* this .
|
=* this .
|
||||||
|= [ject=* gist=barn]
|
|= [ject=* gist=barn]
|
||||||
^- [* _this]
|
^- [* _this]
|
||||||
=| quay=(list [curb=berm sign=(map @ *) vale=@])
|
=| quay=(list [curb=berm sign=(map @ *) vale=@])
|
||||||
=^ [goes=lake uses=pool] this (belt gist)
|
=^ [goes=lake uses=pool rump=@] this (belt gist)
|
||||||
=/ sign (dole uses ject)
|
=/ sign (~(put by *(map @ *)) rump ject)
|
||||||
=/ reed ~| %miss-entry (~(got by goes) ~)
|
=/ reed (~(got by goes) (vent gist))
|
||||||
|^ ^- [* _this]
|
|^ ^- [* _this]
|
||||||
?~ body.reed
|
?~ body.reed
|
||||||
?- -.bend.reed
|
?- -.bend.reed
|
||||||
@ -35,34 +42,36 @@
|
|||||||
::
|
::
|
||||||
%hop (lump +.bend.reed)
|
%hop (lump +.bend.reed)
|
||||||
%lnk
|
%lnk
|
||||||
=^ [goop=lake ruse=pool] this
|
=/ gunk `barn`[[%toss ~] (loan +<.bend.reed)]
|
||||||
|
=^ [goop=lake ruse=pool rump=@] this
|
||||||
(belt [%toss ~] (loan +<.bend.reed))
|
(belt [%toss ~] (loan +<.bend.reed))
|
||||||
%= $
|
%= $
|
||||||
quay [[+>+>.bend.reed sign +>+<.bend.reed] quay]
|
quay [[+>+>.bend.reed sign +>+<.bend.reed] quay]
|
||||||
goes goop
|
goes goop
|
||||||
sign (dole ruse (loan +>-.bend.reed))
|
sign (lend +>-.bend.reed rump)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%cal
|
%cal
|
||||||
=/ [goop=lake ruse=pool] does:(~(got by land.burg) +<.bend.reed)
|
=/ [goop=lake ruse=pool rump=@] does:(~(got by land.burg) +<.bend.reed)
|
||||||
%= $
|
%= $
|
||||||
quay [[+>+>.bend.reed sign +>+<.bend.reed] quay]
|
quay [[+>+>.bend.reed sign +>+<.bend.reed] quay]
|
||||||
goes goop
|
goes goop
|
||||||
sign (yoke +>-.bend.reed ruse)
|
sign (yoke +>-.bend.reed ruse)
|
||||||
|
reed (~(got by goop) (vent +<.bend.reed))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%bec ~| %bec-slip !!
|
%bec ~| %bec-slip !!
|
||||||
%lnt
|
%lnt
|
||||||
=^ [goop=lake ruse=pool] this
|
=^ [goop=lake ruse=pool rump=@] this
|
||||||
(belt [%toss ~] (loan +<.bend.reed))
|
(belt [%toss ~] (loan +<.bend.reed))
|
||||||
~! +>.bend.reed
|
~! +>.bend.reed
|
||||||
%= $
|
%= $
|
||||||
goes goop
|
goes goop
|
||||||
sign (dole ruse (loan +>.bend.reed))
|
sign (lend +>.bend.reed rump)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%jmp
|
%jmp
|
||||||
=/ [goop=lake ruse=pool] does:(~(got by land.burg) +<.bend.reed)
|
=/ [goop=lake ruse=pool rump=@] does:(~(got by land.burg) +<.bend.reed)
|
||||||
%= $
|
%= $
|
||||||
goes goop
|
goes goop
|
||||||
sign (yoke +>.bend.reed ruse)
|
sign (yoke +>.bend.reed ruse)
|
||||||
@ -74,11 +83,11 @@
|
|||||||
%don
|
%don
|
||||||
?~ quay [(loan +.bend.reed) this]
|
?~ quay [(loan +.bend.reed) this]
|
||||||
=/ rail [sub for]:curb.i.quay
|
=/ rail [sub for]:curb.i.quay
|
||||||
=/ [goop=lake ruse=pool] does:(~(got by land.burg) rail)
|
=/ [goop=lake ruse=pool bump=@] does:(~(got by land.burg) rail)
|
||||||
%= $
|
%= $
|
||||||
sign (~(put by sign.i.quay) vale.i.quay (loan +.bend.reed))
|
sign (~(put by sign.i.quay) vale.i.quay (loan +.bend.reed))
|
||||||
goes goop
|
goes goop
|
||||||
reed ~|(%miss-entry (~(got by goes) `curb.i.quay))
|
reed ~|(%miss-entry (~(got by goes) curb.i.quay))
|
||||||
quay t.quay
|
quay t.quay
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -136,9 +145,13 @@
|
|||||||
++ loan
|
++ loan
|
||||||
|= @
|
|= @
|
||||||
~| %loan-miss (~(got by sign) +<)
|
~| %loan-miss (~(got by sign) +<)
|
||||||
|
++ lend
|
||||||
|
|= [src=@ dst=@]
|
||||||
|
^- _sign
|
||||||
|
(~(put by `_sign`~) dst (loan src))
|
||||||
++ lump
|
++ lump
|
||||||
|= berm
|
|= berm
|
||||||
^$(reed ~|(%miss-entry (~(got by goes) `+<)))
|
^$(reed ~|(%miss-entry (~(got by goes) +<)))
|
||||||
++ yoke
|
++ yoke
|
||||||
|= [ox=(list @) lo=pool]
|
|= [ox=(list @) lo=pool]
|
||||||
=| link=(map @ *)
|
=| link=(map @ *)
|
||||||
@ -150,18 +163,13 @@
|
|||||||
~| %yoke-match !!
|
~| %yoke-match !!
|
||||||
$(link (~(put by link) ssa.i.lo (loan i.ox)), ox t.ox, lo t.lo)
|
$(link (~(put by link) ssa.i.lo (loan i.ox)), ox t.ox, lo t.lo)
|
||||||
--
|
--
|
||||||
++ dole
|
|
||||||
|= [=pool ject=*]
|
|
||||||
%- malt
|
|
||||||
%+ turn pool
|
|
||||||
|= [axe=@ ssa=@ ?]
|
|
||||||
[ssa .*(ject [0 axe])]
|
|
||||||
++ belt
|
++ belt
|
||||||
=* this .
|
=* this .
|
||||||
|= gist=barn
|
|= gist=barn
|
||||||
^- [rice _this]
|
^- [rice _this]
|
||||||
=. this +:(reap gist)
|
=. this +:(reap gist)
|
||||||
does:(~(got by burg) gist)
|
:_ this
|
||||||
|
does:(~(got by land.burg) gist)
|
||||||
++ reap
|
++ reap
|
||||||
=* this .
|
=* this .
|
||||||
|= =barn
|
|= =barn
|
||||||
@ -420,11 +428,23 @@
|
|||||||
=| flow=line
|
=| flow=line
|
||||||
=/ axle=@ 1
|
=/ axle=@ 1
|
||||||
=/ fawn does
|
=/ fawn does
|
||||||
|
|^
|
||||||
=- =. lamb.burg lamb.dock
|
=- =. lamb.burg lamb.dock
|
||||||
=. land.burg
|
=. land.burg
|
||||||
%+ ~(put by land.burg) next
|
%+ ~(put by land.burg) next
|
||||||
|
=/ flue (~(got by lake.dock) her)
|
||||||
:_ says
|
:_ says
|
||||||
:- (~(put by lake.dock) ~ [~ %hop her])
|
~| ~(key by lake.dock)
|
||||||
|
=. lake.dock (~(put by (~(del by lake.dock) her)) (vent next) flue)
|
||||||
|
~| ~(key by lake.dock)
|
||||||
|
=. ^dock dock
|
||||||
|
=^ [hose=@ bole=berm] dock (peel hat (vent next))
|
||||||
|
~| ~(key by lake.dock)
|
||||||
|
~| bole
|
||||||
|
=/ alms (~(got by lake.dock) bole)
|
||||||
|
=. lake.dock (~(put by (~(del by lake.dock) bole)) (dole next) alms)
|
||||||
|
:- lake.dock
|
||||||
|
:_ hose
|
||||||
=| safe=? :: XX state maximal safe axes, as this will overly pessimize
|
=| safe=? :: XX state maximal safe axes, as this will overly pessimize
|
||||||
=/ bolt=@ 1
|
=/ bolt=@ 1
|
||||||
|- ^- (list [@ @ ?])
|
|- ^- (list [@ @ ?])
|
||||||
@ -436,8 +456,8 @@
|
|||||||
$(hat left.hat, bolt (peg bolt 2), safe ?&(safe safe.hat))
|
$(hat left.hat, bolt (peg bolt 2), safe ?&(safe safe.hat))
|
||||||
$(hat rite.hat, bolt (peg bolt 3), safe ?&(safe safe.hat))
|
$(hat rite.hat, bolt (peg bolt 3), safe ?&(safe safe.hat))
|
||||||
==
|
==
|
||||||
$(work t.work)
|
^$(work t.work)
|
||||||
|^ ^- [[hat=plow her=berm] dock=_dock]
|
|- ^- [[hat=plow her=berm] dock=_dock]
|
||||||
?- fawn
|
?- fawn
|
||||||
[%par * *]
|
[%par * *]
|
||||||
=^ [one=plow two=plow her=berm] dock twin
|
=^ [one=plow two=plow her=berm] dock twin
|
||||||
@ -874,39 +894,6 @@
|
|||||||
:_ dock
|
:_ dock
|
||||||
[[%disc ~] rock]
|
[[%disc ~] rock]
|
||||||
==
|
==
|
||||||
++ peel :: split a define among a plow's worth of uses
|
|
||||||
|= [mole=plow hill=berm]
|
|
||||||
^- [[use=@ her=berm] _dock]
|
|
||||||
=+
|
|
||||||
|- ^- [[fine=(unit @) load=(list bran)] dock=_dock]
|
|
||||||
?- -.mole
|
|
||||||
%tine [[`+.mole ~] dock]
|
|
||||||
%disc [[~ ~] dock]
|
|
||||||
%fork
|
|
||||||
=^ [file=(unit @) loaf=(list bran)] dock $(mole left.mole)
|
|
||||||
=^ [fire=(unit @) road=(list bran)] dock $(mole rite.mole)
|
|
||||||
?~ file
|
|
||||||
?~ fire
|
|
||||||
[[~ ~] dock]
|
|
||||||
[[fire road] dock]
|
|
||||||
?~ fire
|
|
||||||
[[file loaf] dock]
|
|
||||||
=^ fell dock wean
|
|
||||||
?: safe.mole
|
|
||||||
:_ dock
|
|
||||||
:- `fell
|
|
||||||
[[%hud fell u.file] [%tul fell u.fire] (weld loaf road)]
|
|
||||||
:_ dock
|
|
||||||
:- `fell
|
|
||||||
[[%hed fell u.file] [%tal fell u.fire] (weld loaf road)]
|
|
||||||
==
|
|
||||||
?~ fine
|
|
||||||
=^ crap dock wean :: no uses in the plow, so just make a trash register for the result and return
|
|
||||||
[[crap hill] dock]
|
|
||||||
?~ load :: no loads necessary, just return the register
|
|
||||||
[[u.fine hill] dock]
|
|
||||||
=^ her dock (mend %peel load [%hop hill]) :: loads necessary, add those to the dock and return
|
|
||||||
[[u.fine her] dock]
|
|
||||||
++ take :: axis
|
++ take :: axis
|
||||||
|= [sax=@ tow=plow row=?] :: axis, destination, safety
|
|= [sax=@ tow=plow row=?] :: axis, destination, safety
|
||||||
^- (unit plow) :: nullary case = crash
|
^- (unit plow) :: nullary case = crash
|
||||||
@ -918,14 +905,6 @@
|
|||||||
%2 [%fork $(sax (mas sax)) [%disc ~] row]
|
%2 [%fork $(sax (mas sax)) [%disc ~] row]
|
||||||
%3 [%fork [%disc ~] $(sax (mas sax)) row]
|
%3 [%fork [%disc ~] $(sax (mas sax)) row]
|
||||||
==
|
==
|
||||||
++ milk :: local label
|
|
||||||
|= gen=@
|
|
||||||
^- berm
|
|
||||||
~! next
|
|
||||||
[sub.next for.next axle gen]
|
|
||||||
++ wean :: fresh ssa
|
|
||||||
^- [@ _dock]
|
|
||||||
[lamb.dock dock(lamb .+(lamb.dock))]
|
|
||||||
++ copy :: replicate values to two destinations
|
++ copy :: replicate values to two destinations
|
||||||
|= [hat=plow bat=plow her=berm]
|
|= [hat=plow bat=plow her=berm]
|
||||||
^- [[hat=plow her=berm] _dock]
|
^- [[hat=plow her=berm] _dock]
|
||||||
@ -975,7 +954,7 @@
|
|||||||
==
|
==
|
||||||
==
|
==
|
||||||
=/ blab (milk %copy)
|
=/ blab (milk %copy)
|
||||||
:_ dock(lake (~(put by lake.dock) `blab [moot %hop her]))
|
:_ dock(lake (~(put by lake.dock) blab [moot %hop her]))
|
||||||
[tog blab]
|
[tog blab]
|
||||||
++ twin :: split sans from flow
|
++ twin :: split sans from flow
|
||||||
^- [[plow plow berm] _dock]
|
^- [[plow plow berm] _dock]
|
||||||
@ -1012,15 +991,57 @@
|
|||||||
[[%tine one] [%tine two] her]
|
[[%tine one] [%tine two] her]
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
++ bomb
|
||||||
|
^- [berm _dock]
|
||||||
|
(mend %boom ~ [%bom ~])
|
||||||
|
++ milk :: local label
|
||||||
|
|= gen=@
|
||||||
|
^- berm
|
||||||
|
~! next
|
||||||
|
[sub.next for.next axle gen]
|
||||||
++ mend
|
++ mend
|
||||||
|= [gen=@ =lock]
|
|= [gen=@ =lock]
|
||||||
^- [berm _dock]
|
^- [berm _dock]
|
||||||
=/ curb (milk gen)
|
=/ curb (milk gen)
|
||||||
:- curb
|
:- curb
|
||||||
dock(lake (~(put by lake.dock) `curb lock))
|
dock(lake (~(put by lake.dock) curb lock))
|
||||||
++ bomb
|
++ wean :: fresh ssa
|
||||||
^- [berm _dock]
|
^- [@ _dock]
|
||||||
(mend %boom ~ [%bom ~])
|
[lamb.dock dock(lamb .+(lamb.dock))]
|
||||||
|
++ peel :: split a define among a plow's worth of uses
|
||||||
|
|= [mole=plow hill=berm]
|
||||||
|
^- [[use=@ her=berm] _dock]
|
||||||
|
~& ~(key by lake.dock)
|
||||||
|
=+
|
||||||
|
|- ^- [[fine=(unit @) load=(list bran)] dock=_dock]
|
||||||
|
?- -.mole
|
||||||
|
%tine [[`+.mole ~] dock]
|
||||||
|
%disc [[~ ~] dock]
|
||||||
|
%fork
|
||||||
|
=^ [file=(unit @) loaf=(list bran)] dock $(mole left.mole)
|
||||||
|
=^ [fire=(unit @) road=(list bran)] dock $(mole rite.mole)
|
||||||
|
?~ file
|
||||||
|
?~ fire
|
||||||
|
[[~ ~] dock]
|
||||||
|
[[fire road] dock]
|
||||||
|
?~ fire
|
||||||
|
[[file loaf] dock]
|
||||||
|
=^ fell dock wean
|
||||||
|
?: safe.mole
|
||||||
|
:_ dock
|
||||||
|
:- `fell
|
||||||
|
[[%hud fell u.file] [%tul fell u.fire] (weld loaf road)]
|
||||||
|
:_ dock
|
||||||
|
:- `fell
|
||||||
|
[[%hed fell u.file] [%tal fell u.fire] (weld loaf road)]
|
||||||
|
==
|
||||||
|
?~ fine
|
||||||
|
=^ crap dock wean :: no uses in the plow, so just make a trash register for the result and return
|
||||||
|
=^ her dock (mend %peel ~ [%hop hill])
|
||||||
|
[[crap her] dock]
|
||||||
|
=^ her dock (mend %peel load [%hop hill]) :: loads necessary, add those to the dock and return
|
||||||
|
[[u.fine her] dock]
|
||||||
|
|
||||||
--
|
--
|
||||||
++ rake :: clean up unused basic blocks, and rewrite bec/eye into cal/jmp
|
++ rake :: clean up unused basic blocks, and rewrite bec/eye into cal/jmp
|
||||||
=* this .
|
=* this .
|
||||||
@ -1032,24 +1053,24 @@
|
|||||||
=+ ~| %barn-miss (~(got by land.burg) i.work)
|
=+ ~| %barn-miss (~(got by land.burg) i.work)
|
||||||
^- town
|
^- town
|
||||||
=| loch=lake
|
=| loch=lake
|
||||||
=| sigh=(map @ $%([%mov @] [%con @] [%rug ~]))
|
=| sigh=(map @ $%([%mov @] [%con @ @] [%rug ~]))
|
||||||
=/ tack=[(list (unit berm)) (list (unit berm))] [[~]~ ~] :: label queue
|
=/ tack=[(list berm) (list berm)] [[(vent i.work) ~] ~] :: label queue
|
||||||
|- ^- town :: loop over basic blocks using a queue
|
|- ^- town :: loop over basic blocks using a queue
|
||||||
?~ -.tack
|
?~ -.tack
|
||||||
?~ +.tack
|
?~ +.tack
|
||||||
%= burg
|
%= burg
|
||||||
land
|
land
|
||||||
(~(put by land.burg) i.work [[loch uses.does] says])
|
(~(put by land.burg) i.work [[loch uses.does lump.does] says])
|
||||||
==
|
==
|
||||||
$(tack [(flop +.tack) ~])
|
$(tack [(flop +.tack) ~])
|
||||||
=/ hock ~| %miss-berm (~(got by goes.does) i.-.tack)
|
=/ hock ~| %miss-berm ~| i.-.tack (~(got by goes.does) i.-.tack)
|
||||||
=/ bock body.hock
|
=/ bock body.hock
|
||||||
|^ ^- town :: loop over instructions in a basic block
|
|^ ^- town :: loop over instructions in a basic block
|
||||||
?~ body.hock
|
?~ body.hock
|
||||||
?: ?=(%bec -.bend.hock)
|
?: ?=(%bec -.bend.hock)
|
||||||
(rend [+< +>- `+>+]:bend.hock)
|
(rend [+< +>- `+>+]:bend.hock)
|
||||||
?: ?=(%eye -.bend.hock)
|
?: ?=(%eye -.bend.hock)
|
||||||
(rend [+< +>- ~]:bend.bock)
|
(rend [+< +> ~]:bend.hock)
|
||||||
=. loch (~(put by loch) i.-.tack [bock bend.hock])
|
=. loch (~(put by loch) i.-.tack [bock bend.hock])
|
||||||
?- bend.hock
|
?- bend.hock
|
||||||
[%clq *]
|
[%clq *]
|
||||||
@ -1066,7 +1087,7 @@
|
|||||||
::
|
::
|
||||||
[%lnk *]
|
[%lnk *]
|
||||||
%= ^$
|
%= ^$
|
||||||
sigh (~(put by sigh) +>+<.bend.bock [%rug ~])
|
sigh (~(put by sigh) +>+<.bend.hock [%rug ~])
|
||||||
-.tack t.-.tack
|
-.tack t.-.tack
|
||||||
+.tack [+>+>.bend.hock +.tack]
|
+.tack [+>+>.bend.hock +.tack]
|
||||||
==
|
==
|
||||||
@ -1115,20 +1136,20 @@
|
|||||||
sigh
|
sigh
|
||||||
%+ ~(put by sigh)
|
%+ ~(put by sigh)
|
||||||
+>+.i.body.hock
|
+>+.i.body.hock
|
||||||
[%con +<.body.hock +>-.i.body.hock]
|
[%con +<.i.body.hock +>-.i.body.hock]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
[%hed @ @]
|
[%hed @ @]
|
||||||
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.bock [%rug ~]))
|
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.hock [%rug ~]))
|
||||||
::
|
::
|
||||||
[%hud @ @]
|
[%hud @ @]
|
||||||
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.bock [%rug ~]))
|
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.hock [%rug ~]))
|
||||||
::
|
::
|
||||||
[%tal @ @]
|
[%tal @ @]
|
||||||
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.bock [%rug ~]))
|
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.hock [%rug ~]))
|
||||||
::
|
::
|
||||||
[%tul @ @]
|
[%tul @ @]
|
||||||
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.bock [%rug ~]))
|
$(body.hock t.body.hock, sigh (~(put by sigh) +>.i.body.hock [%rug ~]))
|
||||||
==
|
==
|
||||||
++ rend :: make register assignments to translate a bec/eye into a cal/jmp.
|
++ rend :: make register assignments to translate a bec/eye into a cal/jmp.
|
||||||
|= [=barn tart=@ poem=(unit [@ berm])]
|
|= [=barn tart=@ poem=(unit [@ berm])]
|
||||||
@ -1156,7 +1177,6 @@
|
|||||||
[%rug ~] waft
|
[%rug ~] waft
|
||||||
[%mov *] (~(uni by waft) $(tart +.puff))
|
[%mov *] (~(uni by waft) $(tart +.puff))
|
||||||
[%con *]
|
[%con *]
|
||||||
~! axe
|
|
||||||
=/ left $(tart +<.puff, axe (peg axe 2))
|
=/ left $(tart +<.puff, axe (peg axe 2))
|
||||||
%- ~(uni by waft)
|
%- ~(uni by waft)
|
||||||
%- ~(uni by left)
|
%- ~(uni by left)
|
||||||
@ -1179,7 +1199,7 @@
|
|||||||
=/ pale (~(get by gasp) axle)
|
=/ pale (~(get by gasp) axle)
|
||||||
?~ pale
|
?~ pale
|
||||||
%= $
|
%= $
|
||||||
bins [%hed vale lamb.burg]
|
bins [[%hed vale lamb.burg] bins]
|
||||||
vale lamb.burg
|
vale lamb.burg
|
||||||
gasp (~(put by gasp) axle lamb.burg)
|
gasp (~(put by gasp) axle lamb.burg)
|
||||||
lamb.burg .+(lamb.burg)
|
lamb.burg .+(lamb.burg)
|
||||||
@ -1192,7 +1212,7 @@
|
|||||||
=/ pale (~(get by gasp) axle)
|
=/ pale (~(get by gasp) axle)
|
||||||
?~ pale
|
?~ pale
|
||||||
%= $
|
%= $
|
||||||
bins [%tal vale lamb.burg]
|
bins [[%tal vale lamb.burg] bins]
|
||||||
vale lamb.burg
|
vale lamb.burg
|
||||||
gasp (~(put by gasp) axle lamb.burg)
|
gasp (~(put by gasp) axle lamb.burg)
|
||||||
lamb.burg .+(lamb.burg)
|
lamb.burg .+(lamb.burg)
|
||||||
@ -1209,8 +1229,8 @@
|
|||||||
^- _this
|
^- _this
|
||||||
?~ work this
|
?~ work this
|
||||||
=/ herd (~(got by land.burg) i.work) :: sack for this arm
|
=/ herd (~(got by land.burg) i.work) :: sack for this arm
|
||||||
=| dead=(jug (unit berm) @) :: values used by a label and its successor code
|
=| dead=(jug berm @) :: values used by a label and its successor code
|
||||||
=/ furs=(list (unit berm)) [~]~
|
=/ furs=(list berm) [[sub for 1 %vent]:i.work ~]
|
||||||
|- ^- _this
|
|- ^- _this
|
||||||
?~ furs
|
?~ furs
|
||||||
^$(work t.work, land.burg (~(put by land.burg) i.work herd))
|
^$(work t.work, land.burg (~(put by land.burg) i.work herd))
|
||||||
@ -1220,42 +1240,42 @@
|
|||||||
|^
|
|^
|
||||||
?- -.bend.meat
|
?- -.bend.meat
|
||||||
%clq
|
%clq
|
||||||
=/ troo (~(get by dead) `+>-.bend.meat)
|
=/ troo (~(get by dead) +>-.bend.meat)
|
||||||
?~ troo $(furs [`+>-.bend.meat furs])
|
?~ troo $(furs [+>-.bend.meat furs])
|
||||||
=/ fals (~(get by dead) `+>+.bend.meat)
|
=/ fals (~(get by dead) +>+.bend.meat)
|
||||||
?~ fals $(furs [`+>+.bend.meat furs])
|
?~ fals $(furs [+>+.bend.meat furs])
|
||||||
~! u.troo
|
~! u.troo
|
||||||
~! u.fals
|
~! u.fals
|
||||||
~! +<.bend.meat
|
~! +<.bend.meat
|
||||||
(vein (~(uni in u.troo) (~(put in u.fals) +<.bend.meat)))
|
(vein (~(uni in u.troo) (~(put in u.fals) +<.bend.meat)))
|
||||||
::
|
::
|
||||||
%eqq
|
%eqq
|
||||||
=/ troo (~(get by dead) `+>+<.bend.meat)
|
=/ troo (~(get by dead) +>+<.bend.meat)
|
||||||
?~ troo $(furs [`+>+<.bend.meat furs])
|
?~ troo $(furs [+>+<.bend.meat furs])
|
||||||
=/ fals (~(get by dead) `+>+>.bend.meat)
|
=/ fals (~(get by dead) +>+>.bend.meat)
|
||||||
?~ fals $(furs [`+>+>.bend.meat furs])
|
?~ fals $(furs [+>+>.bend.meat furs])
|
||||||
(vein (~(uni in u.troo) (~(gas in u.fals) [+<.bend.meat +>-.bend.meat ~])))
|
(vein (~(uni in u.troo) (~(gas in u.fals) [+<.bend.meat +>-.bend.meat ~])))
|
||||||
::
|
::
|
||||||
%brn
|
%brn
|
||||||
=/ troo (~(get by dead) `+>-.bend.meat)
|
=/ troo (~(get by dead) +>-.bend.meat)
|
||||||
?~ troo $(furs [`+>-.bend.meat furs])
|
?~ troo $(furs [+>-.bend.meat furs])
|
||||||
=/ fals (~(get by dead) `+>+.bend.meat)
|
=/ fals (~(get by dead) +>+.bend.meat)
|
||||||
?~ fals $(furs [`+>+.bend.meat furs])
|
?~ fals $(furs [+>+.bend.meat furs])
|
||||||
(vein (~(uni in u.troo) (~(put in u.fals) +<.bend.meat)))
|
(vein (~(uni in u.troo) (~(put in u.fals) +<.bend.meat)))
|
||||||
::
|
::
|
||||||
%hop
|
%hop
|
||||||
=/ want (~(get by dead) `+.bend.meat)
|
=/ want (~(get by dead) +.bend.meat)
|
||||||
?~ want $(furs [`+.bend.meat furs])
|
?~ want $(furs [+.bend.meat furs])
|
||||||
(vein u.want)
|
(vein u.want)
|
||||||
::
|
::
|
||||||
%lnk
|
%lnk
|
||||||
=/ want (~(get by dead) `+>+>.bend.meat)
|
=/ want (~(get by dead) +>+>.bend.meat)
|
||||||
?~ want $(furs [`+>+>.bend.meat furs])
|
?~ want $(furs [+>+>.bend.meat furs])
|
||||||
(vein (~(gas in u.want) [+<.bend.meat +>-.bend.meat ~]))
|
(vein (~(gas in u.want) [+<.bend.meat +>-.bend.meat ~]))
|
||||||
::
|
::
|
||||||
%cal
|
%cal
|
||||||
=/ want (~(get by dead) `+>+>.bend.meat)
|
=/ want (~(get by dead) +>+>.bend.meat)
|
||||||
?~ want $(furs [`+>+>.bend.meat furs])
|
?~ want $(furs [+>+>.bend.meat furs])
|
||||||
(vein (~(gas in u.want) +>-.bend.meat))
|
(vein (~(gas in u.want) +>-.bend.meat))
|
||||||
::
|
::
|
||||||
%bec
|
%bec
|
||||||
@ -1271,13 +1291,13 @@
|
|||||||
~| %eye-trip !!
|
~| %eye-trip !!
|
||||||
::
|
::
|
||||||
%spy
|
%spy
|
||||||
=/ want (~(get by dead) `+>+>.bend.meat)
|
=/ want (~(get by dead) +>+>.bend.meat)
|
||||||
?~ want $(furs [`+>+>.bend.meat furs])
|
?~ want $(furs [+>+>.bend.meat furs])
|
||||||
(vein (~(gas in u.want) [+<.bend.meat +>-.bend.meat ~]))
|
(vein (~(gas in u.want) [+<.bend.meat +>-.bend.meat ~]))
|
||||||
::
|
::
|
||||||
%hnt
|
%hnt
|
||||||
=/ want (~(get by dead) `+>.bend.meat)
|
=/ want (~(get by dead) +>.bend.meat)
|
||||||
?~ want $(furs [`+>.bend.meat furs])
|
?~ want $(furs [+>.bend.meat furs])
|
||||||
(vein (~(put in u.want) +<.bend.meat))
|
(vein (~(put in u.want) +<.bend.meat))
|
||||||
::
|
::
|
||||||
%don
|
%don
|
||||||
@ -1299,7 +1319,7 @@
|
|||||||
goes.does.herd
|
goes.does.herd
|
||||||
(~(put by goes.does.herd) i.furs [bond bend.meat])
|
(~(put by goes.does.herd) i.furs [bond bend.meat])
|
||||||
dead
|
dead
|
||||||
(~(put by dead) i.furs `(set @)`uses)
|
(~(put by dead) i.furs uses)
|
||||||
==
|
==
|
||||||
?- -.i.boyd
|
?- -.i.boyd
|
||||||
%imm
|
%imm
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
==
|
==
|
||||||
+$ farm [yard=(map barn [does=nomm says=boot]) wood=(list barn)]
|
+$ farm [yard=(map barn [does=nomm says=boot]) wood=(list barn)]
|
||||||
+| %lin
|
+| %lin
|
||||||
+$ berm [sub=sock for=* ax=@ gen=@] :: local label
|
+$ berm [sub=sock for=* ax=@ gen=@tas] :: local label
|
||||||
+$ plow :: noun<->ssa map
|
+$ plow :: noun<->ssa map
|
||||||
$% [%fork left=plow rite=plow safe=?] :: cons of two mappings
|
$% [%fork left=plow rite=plow safe=?] :: cons of two mappings
|
||||||
[%tine @] :: use this SSA value at this axis
|
[%tine @] :: use this SSA value at this axis
|
||||||
@ -87,8 +87,8 @@
|
|||||||
==
|
==
|
||||||
+$ pool (list [axe=@ ssa=@ saf=?]) :: entry point subject uses: ordered subject/ssa/safety
|
+$ pool (list [axe=@ ssa=@ saf=?]) :: entry point subject uses: ordered subject/ssa/safety
|
||||||
+$ lock [body=(list bran) bend=germ] :: basic block: instructions + a terminator or branch
|
+$ lock [body=(list bran) bend=germ] :: basic block: instructions + a terminator or branch
|
||||||
+$ lake (map (unit berm) lock) :: labeled basic blocks
|
+$ lake (map berm lock) :: code table of basic blocks
|
||||||
+$ rice [goes=lake uses=pool] :: labeled basic blocks
|
+$ rice [goes=lake uses=pool lump=@] :: entry information and code table for an arm
|
||||||
+$ sack [does=rice says=boot] :: code table entry: basic blocks + SKA result for an arm
|
+$ sack [does=rice says=boot] :: code table entry: basic blocks + SKA result for an arm
|
||||||
+$ town [land=(map barn sack) lamb=@] :: code table
|
+$ town [land=(map barn sack) lamb=@] :: code table
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user