From 3fd545e40fc03cac0ea6b85f2ed49ea868fee2c3 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 14 May 2020 11:00:52 -0700 Subject: [PATCH] hoon: switches %hunk to scry sample --- pkg/arvo/sys/hoon.hoon | 5 +++-- pkg/urbit/noun/nock.c | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 5174bfb57..cdec3926b 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -6449,7 +6449,7 @@ ?~ result [%1 product.path] ?~ u.result - [%2 [%hunk product.path] trace] + [%2 [%hunk product.ref product.path] trace] [%0 u.u.result] == :: @@ -6510,7 +6510,8 @@ =+ rep=$(trace.ton t.trace.ton) =* dat +.i.trace.ton ?+ -.i.trace.ton rep - $hunk =/ sof=(unit path) ((soft path) dat) + $hunk ?@ dat rep + =/ sof=(unit path) ((soft path) +.dat) ?~ sof rep [(smyt u.sof) rep] $lose ?^ dat rep diff --git a/pkg/urbit/noun/nock.c b/pkg/urbit/noun/nock.c index d12816cd7..ec1a35498 100644 --- a/pkg/urbit/noun/nock.c +++ b/pkg/urbit/noun/nock.c @@ -351,7 +351,7 @@ _n_nock_on(u3_noun bus, u3_noun fol) u3_noun val; u3t_off(noc_o); - val = u3m_soft_esc(ref, u3k(gof)); + val = u3m_soft_esc(u3k(ref), u3k(gof)); u3t_on(noc_o); if ( !_(u3du(val)) ) { @@ -361,12 +361,13 @@ _n_nock_on(u3_noun bus, u3_noun fol) // // replace with proper error stack push // - u3t_push(u3nc(c3__hunk, gof)); + u3t_push(u3nt(c3__hunk, ref, gof)); return u3m_bail(c3__exit); } else { u3_noun pro; + u3z(ref); u3z(gof); u3z(fol); pro = u3k(u3t(u3t(val))); @@ -2131,7 +2132,7 @@ _n_burn(u3n_prog* pog_u, u3_noun bus, c3_ys mov, c3_ys off) top = _n_swap(mov, off); // [ref bus] wish_in: u3t_off(noc_o); - x = u3m_soft_esc(*top, u3k(o)); + x = u3m_soft_esc(u3k(*top), u3k(o)); u3t_on(noc_o); if ( c3n == u3du(x) ) { @@ -2139,12 +2140,13 @@ _n_burn(u3n_prog* pog_u, u3_noun bus, c3_ys mov, c3_ys off) return u3_none; } else if ( c3n == u3du(u3t(x)) ) { - u3t_push(u3nc(c3__hunk, o)); + u3t_push(u3nt(c3__hunk, *top, o)); u3m_bail(c3__exit); return u3_none; } else { u3z(o); + u3z(*top); *top = u3k(u3t(u3t(x))); u3z(x); BURN();