hoon: switches %hunk to scry sample

This commit is contained in:
Joe Bryan 2020-05-14 11:00:52 -07:00
parent 27a47cc72f
commit 3fd545e40f
2 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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();