From 34b473f12642a07479ae152eaa54d0e1859f895a Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 14 Aug 2024 13:37:36 -0400 Subject: [PATCH 1/2] line: emit %cons, not %mov for %both needs in +into --- hoon/codegen/lib/line.hoon | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hoon/codegen/lib/line.hoon b/hoon/codegen/lib/line.hoon index 2b06873..89d2b28 100644 --- a/hoon/codegen/lib/line.hoon +++ b/hoon/codegen/lib/line.hoon @@ -984,9 +984,13 @@ $(tres [[now p %this b] tres], twig [%this a], pose [pole pose]) :: %both - =/ =pole [%mov p sass.twig] - =* l left.twig - =* r rite.twig + =^ l=$<(%none need) gen + ?. ?=(%none -.left.twig) [left.twig gen] + =^(r gen rain [[%this r] gen]) + =^ r=$<(%none need) gen + ?. ?=(%none -.rite.twig) [rite.twig gen] + =^(r gen rain [[%this r] gen]) + =/ =pole [%con +:(sass l) +:(sass r) sass.twig] =+ [a b]=?:(?=(%2 now) [l r] [r l]) $(tres [[now p b] tres], twig a, pose [pole pose]) :: From 5eca82a956c38c14dfbebec646f28a59d3eac816 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 14 Aug 2024 13:38:11 -0400 Subject: [PATCH 2/2] line: respect %both needs of immediates (via +kerf) --- hoon/codegen/lib/line.hoon | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hoon/codegen/lib/line.hoon b/hoon/codegen/lib/line.hoon index 89d2b28..45cbea8 100644 --- a/hoon/codegen/lib/line.hoon +++ b/hoon/codegen/lib/line.hoon @@ -1022,12 +1022,9 @@ $(todo [pole todo], tack t.tack) :: %both - %= $ - tack - ?: ?=(?(~ [~ @]) no) - [[~ rite.ne] [~ left.ne] t.tack] - [[`+.u.no rite.ne] [`-.u.no left.ne] t.tack] - == + =^ [y=@uwoo r=@uvre] gen (kerf [%next ne u]) + =/ =pole ?~(no [%poi r] [%imm u.no r]) + $(u y, todo [pole todo], tack t.tack) :: %none $(tack t.tack) ==