From 50c8fafbc5b33c6a663d66537e1e1edc034c9b7c Mon Sep 17 00:00:00 2001 From: Raymond Pasco Date: Sat, 26 Sep 2015 18:06:30 -0400 Subject: [PATCH] Revert big green merge button This reverts commit 963439d53028fbe0d22ba1fb37713dd0a3fbb9f4, reversing changes made to 4aa4d31472574da31d39af022eff4382973ba683. --- noun/nock.c | 352 ++++++++++++++++++++++++++-------------------------- 1 file changed, 176 insertions(+), 176 deletions(-) diff --git a/noun/nock.c b/noun/nock.c index 9fc771dd3..0d2b1ff4e 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -133,212 +133,212 @@ _n_nock_on(u3_noun bus, u3_noun fol) u3a_lose(fol); return u3i_cell(poz, riv); } - else { - static void* lut[] = { - &&l0, &&l1, &&l2, &&l3, &&l4, &&l5, - &&l6, &&l7, &&l8, &&l9, &&l10, &&l11 - }; + else switch ( hib ) { + default: return u3m_bail(c3__exit); - if(hib > 11) { - return u3m_bail(c3__exit); + case 0: { + if ( c3n == u3r_ud(gal) ) { + return u3m_bail(c3__exit); + } + else { + u3_noun pro = u3k(u3at(gal, bus)); + + u3a_lose(bus); u3a_lose(fol); + return pro; + } } + c3_assert(!"not reached"); - goto *lut[hib]; - - { - l0: { - if ( c3n == u3r_ud(gal) ) { - return u3m_bail(c3__exit); - } - else { - u3_noun pro = u3k(u3at(gal, bus)); + case 1: { + u3_noun pro = u3k(gal); - u3a_lose(bus); u3a_lose(fol); - return pro; - } - } + u3a_lose(bus); u3a_lose(fol); + return pro; + } + c3_assert(!"not reached"); - l1: { - u3_noun pro = u3k(gal); + case 2: { + u3_noun nex = _n_nock_on(u3k(bus), u3k(u3t(gal))); + u3_noun seb = _n_nock_on(bus, u3k(u3h(gal))); - u3a_lose(bus); u3a_lose(fol); - return pro; - } + u3a_lose(fol); + bus = seb; + fol = nex; + continue; + } + c3_assert(!"not reached"); - l2: { - u3_noun nex = _n_nock_on(u3k(bus), u3k(u3t(gal))); - u3_noun seb = _n_nock_on(bus, u3k(u3h(gal))); + case 3: { + u3_noun gof, pro; - u3a_lose(fol); - bus = seb; - fol = nex; - continue; - } + gof = _n_nock_on(bus, u3k(gal)); + pro = u3r_du(gof); - l3: { - u3_noun gof, pro; + u3a_lose(gof); u3a_lose(fol); + return pro; + } + c3_assert(!"not reached"); - gof = _n_nock_on(bus, u3k(gal)); - pro = u3r_du(gof); + case 4: { + u3_noun gof, pro; - u3a_lose(gof); u3a_lose(fol); - return pro; - } + gof = _n_nock_on(bus, u3k(gal)); + pro = u3i_vint(gof); - l4: { - u3_noun gof, pro; + u3a_lose(fol); + return pro; + } + c3_assert(!"not reached"); - gof = _n_nock_on(bus, u3k(gal)); - pro = u3i_vint(gof); + case 5: { + u3_noun wim = _n_nock_on(bus, u3k(gal)); + u3_noun pro = u3r_sing(u3h(wim), u3t(wim)); - u3a_lose(fol); - return pro; - } + u3a_lose(wim); u3a_lose(fol); + return pro; + } + c3_assert(!"not reached"); - l5: { - u3_noun wim = _n_nock_on(bus, u3k(gal)); - u3_noun pro = u3r_sing(u3h(wim), u3t(wim)); + case 6: { + u3_noun b_gal, c_gal, d_gal; - u3a_lose(wim); u3a_lose(fol); - return pro; - } + u3x_trel(gal, &b_gal, &c_gal, &d_gal); + { + u3_noun tys = _n_nock_on(u3k(bus), u3k(b_gal)); + u3_noun nex; - l6: { - u3_noun b_gal, c_gal, d_gal; + if ( 0 == tys ) { + nex = u3k(c_gal); + } else if ( 1 == tys ) { + nex = u3k(d_gal); + } else return u3m_bail(c3__exit); - u3x_trel(gal, &b_gal, &c_gal, &d_gal); - { - u3_noun tys = _n_nock_on(u3k(bus), u3k(b_gal)); - u3_noun nex; + u3a_lose(fol); + fol = nex; + continue; + } + } + c3_assert(!"not reached"); - if ( 0 == tys ) { - nex = u3k(c_gal); - } else if ( 1 == tys ) { - nex = u3k(d_gal); - } else return u3m_bail(c3__exit); + case 7: { + u3_noun b_gal, c_gal; - u3a_lose(fol); - fol = nex; - continue; - } - } + u3x_cell(gal, &b_gal, &c_gal); + { + u3_noun bod = _n_nock_on(bus, u3k(b_gal)); + u3_noun nex = u3k(c_gal); - l7: { - u3_noun b_gal, c_gal; + u3a_lose(fol); + bus = bod; + fol = nex; + continue; + } + } + c3_assert(!"not reached"); - u3x_cell(gal, &b_gal, &c_gal); - { - u3_noun bod = _n_nock_on(bus, u3k(b_gal)); - u3_noun nex = u3k(c_gal); + case 8: { + u3_noun b_gal, c_gal; - u3a_lose(fol); - bus = bod; - fol = nex; - continue; - } - } + u3x_cell(gal, &b_gal, &c_gal); + { + u3_noun heb = _n_nock_on(u3k(bus), u3k(b_gal)); + u3_noun bod = u3nc(heb, bus); + u3_noun nex = u3k(c_gal); - l8: { - u3_noun b_gal, c_gal; + u3a_lose(fol); + bus = bod; + fol = nex; + continue; + } + } + c3_assert(!"not reached"); - u3x_cell(gal, &b_gal, &c_gal); - { - u3_noun heb = _n_nock_on(u3k(bus), u3k(b_gal)); - u3_noun bod = u3nc(heb, bus); - u3_noun nex = u3k(c_gal); + case 9: { + u3_noun b_gal, c_gal; - u3a_lose(fol); - bus = bod; - fol = nex; - continue; - } - } - - l9: { - u3_noun b_gal, c_gal; - - u3x_cell(gal, &b_gal, &c_gal); - { - u3_noun seb = _n_nock_on(bus, u3k(c_gal)); - u3_noun pro; + u3x_cell(gal, &b_gal, &c_gal); + { + u3_noun seb = _n_nock_on(bus, u3k(c_gal)); + u3_noun pro; - u3t_off(noc_o); - pro = u3j_kick(seb, b_gal); - u3t_on(noc_o); + u3t_off(noc_o); + pro = u3j_kick(seb, b_gal); + u3t_on(noc_o); - if ( u3_none != pro ) { - u3a_lose(fol); - return pro; - } - else { - if ( c3n == u3r_ud(b_gal) ) { - return u3m_bail(c3__exit); - } - else { - u3_noun nex = u3k(u3at(b_gal, seb)); + if ( u3_none != pro ) { + u3a_lose(fol); + return pro; + } + else { + if ( c3n == u3r_ud(b_gal) ) { + return u3m_bail(c3__exit); + } + else { + u3_noun nex = u3k(u3at(b_gal, seb)); - u3a_lose(fol); - bus = seb; - fol = nex; - continue; - } - } - } - } - - l10: { - u3_noun p_gal, q_gal; - - u3x_cell(gal, &p_gal, &q_gal); - { - u3_noun zep, hod, nex; - - if ( c3y == u3r_du(p_gal) ) { - u3_noun b_gal = u3h(p_gal); - u3_noun c_gal = u3t(p_gal); - u3_noun d_gal = q_gal; - - zep = u3k(b_gal); - hod = _n_nock_on(u3k(bus), u3k(c_gal)); - nex = u3k(d_gal); - } - else { - u3_noun b_gal = p_gal; - u3_noun c_gal = q_gal; - - zep = u3k(b_gal); - hod = u3_nul; - nex = u3k(c_gal); - } - - u3a_lose(fol); - return _n_hint(zep, hod, bus, nex); - } - } - - l11: { - u3_noun gof = _n_nock_on(bus, u3k(gal)); - u3_noun val; - - u3t_off(noc_o); - val = u3m_soft_esc(u3k(gof)); - u3t_on(noc_o); - - if ( !_(u3du(val)) ) { - u3m_bail(u3nt(1, gof, 0)); - } - else { - u3_noun pro; - - u3z(gof); - u3z(fol); - pro = u3k(u3t(val)); - u3z(val); - - return pro; - } - } + u3a_lose(fol); + bus = seb; + fol = nex; + continue; + } + } + } } + c3_assert(!"not reached"); + + case 10: { + u3_noun p_gal, q_gal; + + u3x_cell(gal, &p_gal, &q_gal); + { + u3_noun zep, hod, nex; + + if ( c3y == u3r_du(p_gal) ) { + u3_noun b_gal = u3h(p_gal); + u3_noun c_gal = u3t(p_gal); + u3_noun d_gal = q_gal; + + zep = u3k(b_gal); + hod = _n_nock_on(u3k(bus), u3k(c_gal)); + nex = u3k(d_gal); + } + else { + u3_noun b_gal = p_gal; + u3_noun c_gal = q_gal; + + zep = u3k(b_gal); + hod = u3_nul; + nex = u3k(c_gal); + } + + u3a_lose(fol); + return _n_hint(zep, hod, bus, nex); + } + } + + case 11: { + u3_noun gof = _n_nock_on(bus, u3k(gal)); + u3_noun val; + + u3t_off(noc_o); + val = u3m_soft_esc(u3k(gof)); + u3t_on(noc_o); + + if ( !_(u3du(val)) ) { + u3m_bail(u3nt(1, gof, 0)); + } + else { + u3_noun pro; + + u3z(gof); + u3z(fol); + pro = u3k(u3t(val)); + u3z(val); + + return pro; + } + } + c3_assert(!"not reached"); } } }