From 0b6c4f8a1d4529678b8f4826cfdc3ea6741c9475 Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Wed, 14 Sep 2022 22:05:21 -0500 Subject: [PATCH] ska spec: proper equality tests, proper crashing for 0 --- docs/spec/ska/lib/degen.hoon | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/spec/ska/lib/degen.hoon b/docs/spec/ska/lib/degen.hoon index e9f3e77..5448806 100644 --- a/docs/spec/ska/lib/degen.hoon +++ b/docs/spec/ska/lib/degen.hoon @@ -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