ska spec: proper equality tests, proper crashing for 0

This commit is contained in:
Edward Amsden 2022-09-14 22:05:21 -05:00
parent c42c28215d
commit 0b6c4f8a1d
No known key found for this signature in database
GPG Key ID: 548EDF608CA956F6

View File

@ -47,6 +47,8 @@
(cobb:ska shed stal)
::
[%0 @]
?: =(0 +.fate)
bomb
=. this (inst [%mov (peg 3 +.fate) vale])
=. this bale
:_ this
@ -142,8 +144,11 @@
:: TODO: statically jump to a branch if we know equal or
:: disequal
=/ tier (bear 7)
=^ left this $(faxe (peg 6 faxe), fate +<.fate, heir [%dab tier], vale 8)
=^ left this $(faxe (peg 6 faxe), fate +<.fate, heir [%dab tier], vale 4)
=. this (inst [%sft ~])
=^ rite this $(faxe (peg 7 faxe), fate +>.fate, heir [%dab here], vale 9)
=. this (inst [%mov 10 8])
=. this (inst [%mov 11 5]) :: pop without overwriting 4 XX this is probably what we want ust to do anyway
=. this (inst [%eqq will wont])
=. this does
=. this dont