Completed first round of changes to +coil.

This commit is contained in:
Curtis Yarvin 2018-05-14 21:22:39 -07:00
parent 1c0a471b65
commit 612c9a8d6a
5 changed files with 25 additions and 12 deletions

View File

@ -197,9 +197,11 @@
u3_noun gil)
{
u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut;
u3_noun ppq_sut, qpq_sut, rpq_sut;
u3x_cell(u3t(sut), &p_sut, &q_sut);
u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut);
u3x_trel(pq_sut, &ppq_sut, &qpq_sut, &rpq_sut);
u3x_cell(rq_sut, &prq_sut, &qrq_sut);
{
if ( u3_nul == q_heg ) {
@ -228,7 +230,7 @@
mut = u3nt(c3__core,
u3k(p_sut),
u3nt(c3__gold,
u3nt(u3nt(u3k(ppq_sut), u3k(qpq_sut), c3__gold),
u3k(qq_sut),
u3k(rq_sut)));
@ -243,7 +245,7 @@
return pro;
}
else {
u3_noun pec = u3qzu_peel(van, sut, way, pq_sut);
u3_noun pec = u3qzu_peel(van, sut, way, rpq_sut);
u3_noun pro;
if ( c3n == u3h(pec) ) {

View File

@ -121,6 +121,8 @@
u3_noun pq_sut, qq_sut, rq_sut;
u3_noun pq_ref, qq_ref, rq_ref;
u3_noun prq_sut, qrq_sut, prq_ref, qrq_ref;
u3_noun ppq_sut, qpq_sut, rpq_sut;
u3_noun ppq_ref, qpq_ref, rpq_ref;
u3_noun ret;
u3x_trel(sut, 0, &p_sut, &q_sut);
@ -128,6 +130,9 @@
u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut);
u3x_trel(q_ref, &pq_ref, &qq_ref, &rq_ref);
u3x_trel(pq_sut, &ppq_sut, &qpq_sut, &rpq_sut);
u3x_trel(pq_ref, &ppq_ref, &qpq_ref, &rpq_ref);
u3x_cell(rq_sut, &prq_sut, &qrq_sut);
u3x_cell(rq_ref, &prq_ref, &qrq_ref);
@ -145,9 +150,9 @@
return c3n;
}
else {
if ( (pq_sut != pq_ref) &&
(c3__lead != pq_sut) &&
(c3__gold != pq_ref) )
if ( (rpq_sut != rpq_ref) &&
(c3__lead != rpq_sut) &&
(c3__gold != rpq_ref) )
{
return c3n;
}
@ -163,12 +168,12 @@
u3_noun zoc = u3qdi_put(gil, hud);
u3_noun tus = u3nt(c3__core,
u3k(qq_sut),
u3nc(c3__gold,
u3nc(u3nt(u3k(ppq_sut), u3k(qpq_sut), c3__gold),
u3k(u3t(q_sut))));
u3_noun fer = u3nt(c3__core,
u3k(qq_ref),
u3nc(c3__gold,
u3nc(u3nt(u3k(ppq_ref), u3k(qpq_ref), c3__gold),
u3k(u3t(q_ref))));
ret = _nest_dope(van, tus, tel, fer, qrq_sut, qrq_ref, zoc);
@ -181,7 +186,7 @@
return c3n;
}
else {
switch ( pq_sut ) {
switch ( rpq_sut ) {
default: return u3m_bail(c3__fail);
case c3__gold: {

View File

@ -71,10 +71,12 @@
}
case c3__core: {
u3_noun pq_sut, qq_sut, rq_sut;
u3_noun ppq_sut, qpq_sut, rpq_sut;
u3_noun prq_sut, qrq_sut;
if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ||
(c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) ||
(c3n == u3r_trel(pq_sut, &ppq_sut, &qpq_sut, &rpq_sut)) ||
(c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) )
{
return u3m_bail(c3__fail);
@ -83,7 +85,7 @@
u3_atom lat = u3qc_mas(axe);
if ( 3 == now ) {
u3_noun pec = u3qzu_peel(van, sut, way, pq_sut);
u3_noun pec = u3qzu_peel(van, sut, way, rpq_sut);
u3_noun sam = u3h(pec);
u3_noun con = u3t(pec);

View File

@ -187,7 +187,7 @@
u3_noun dan = _play_in(van, sut, ruf);
return _play_core(dan,
u3nt(u3k(mel),
u3nt(u3nt(u3_nul, c3__dry, u3k(mel)),
u3k(dan),
u3nc(u3nc(u3nc(c3__full, u3_nul), u3_nul),
u3k(dom))));

View File

@ -33,17 +33,21 @@
case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut);
{
u3_noun pq_sut, qq_sut, rq_sut;
u3_noun ppq_sut, qpq_sut, rpq_sut;
if ( c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut) ) {
return u3m_bail(c3__fail);
}
else if ( c3__gold != pq_sut ) {
if ( c3n == u3r_trel(pq_sut, &ppq_sut, &qpq_sut, &rpq_sut) ) {
return u3m_bail(c3__fail);
}
else if ( c3__gold != rpq_sut ) {
return u3m_error("wrap-gold");
}
else {
return u3nt(c3__core,
u3k(p_sut),
u3nt(u3k(yoz),
u3nt(u3nt(u3k(ppq_sut), u3k(qpq_sut), u3k(yoz)),
u3k(qq_sut),
u3k(rq_sut)));
}