Now with correct gc.

This commit is contained in:
C. Guy Yarvin 2014-10-25 12:41:37 -07:00
parent acc86923b6
commit f96cfde67e
2 changed files with 10 additions and 5 deletions

13
g/j.c
View File

@ -1188,7 +1188,10 @@ _cj_hook_in(u3_noun cor,
// //
if ( 0 == pax ) { return u3_cm_bail(c3__fail); } if ( 0 == pax ) { return u3_cm_bail(c3__fail); }
else { else {
return _cj_hook_in(u3k(u3_cx_at(pax, cor)), tam_c, jet_o); u3_noun inn = u3k(u3_cx_at(pax, cor));
u3z(cax); u3z(cor);
return _cj_hook_in(inn, tam_c, jet_o);
} }
} }
else { else {
@ -1205,17 +1208,18 @@ _cj_hook_in(u3_noun cor,
axe_l))) ) axe_l))) )
{ {
if ( 0 == axe_l ) { if ( 0 == axe_l ) {
u3z(cax);
return u3_cn_nock_on(cor, fol); return u3_cn_nock_on(cor, fol);
} else { } else {
// Tricky: the above case would work here too, but would // Tricky: the above case would work here too, but would
// disable jet_o and create some infinite recursions. // disable jet_o and create some infinite recursions.
// //
u3z(fol); u3z(cax); u3z(fol);
return u3_cn_nock_on(cor, u3k(u3_cx_at(axe_l, cor))); return u3_cn_nock_on(cor, u3k(u3_cx_at(axe_l, cor)));
} }
} }
else { else {
u3z(fol); u3z(cax); u3z(fol);
return pro; return pro;
} }
} }
@ -1344,7 +1348,7 @@ u3_cj_kicq(u3_noun cor, u3_noun axe)
u3_noun inx = u3_ckdb_get(u3k(hap), u3k(axe)); u3_noun inx = u3_ckdb_get(u3k(hap), u3k(axe));
if ( u3_none == inx ) { if ( u3_none == inx ) {
return u3_none; u3z(cax); return u3_none;
} }
else { else {
c3_l jax_l = u3h(cax); c3_l jax_l = u3h(cax);
@ -1352,6 +1356,7 @@ u3_cj_kicq(u3_noun cor, u3_noun axe)
c3_l inx_l = inx; c3_l inx_l = inx;
u3_cs_harm* ham_u = &cop_u->arm_u[inx_l]; u3_cs_harm* ham_u = &cop_u->arm_u[inx_l];
u3z(cax);
return _cj_kick_z(cor, cop_u, ham_u, axe); return _cj_kick_z(cor, cop_u, ham_u, axe);
} }
} }

2
g/n.c
View File

@ -248,7 +248,7 @@ u3_cn_nock_on(u3_noun bus, u3_noun fol)
u3_cx_cell(gal, &b_gal, &c_gal); u3_cx_cell(gal, &b_gal, &c_gal);
{ {
u3_noun seb = u3_cn_nock_on(bus, u3k(c_gal)); u3_noun seb = u3_cn_nock_on(bus, u3k(c_gal));
u3_noun pro = u3_cj_kick(seb, b_gal); u3_noun pro = u3_cj_kicq(seb, b_gal);
if ( u3_none != pro ) { if ( u3_none != pro ) {
u3_ca_lose(fol); u3_ca_lose(fol);