Double verified, early hxts.

This commit is contained in:
C. Guy Yarvin 2013-12-15 00:23:23 -08:00
parent a6152b80f9
commit a440b80f6e
7 changed files with 193 additions and 1 deletions

View File

@ -186,6 +186,7 @@
u2_bt(wir_r, c3__dtsg, 'f', u2_no));
}
}
#if 0
_open_do_pqr(wtls) // ?+
{
u2_noun tul = u2_bc(wir_r,
@ -198,6 +199,7 @@
u2_rz(wir_r, tul);
return ret;
}
#endif
_open_do_p(wtzp) // ?!
{
return u2_bq
@ -651,7 +653,7 @@
_open_p (wtzp);
_open_p (wtbr);
_open_p (wtpm);
_open_pqr (wtls);
// _open_pqr (wtls);
// _open_pqr (wtsg);
// _open_pq (wthp);
_open_pq (wtgr);

View File

@ -687,6 +687,33 @@
return ret;
}
case c3__hxts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_mint_used(wir_r);
{
u2_noun sec = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, p_gen);
u2_noun lar = _mint_foil(wir_r, sec);
u2_noun p_lar = u2_h(lar);
u2_noun q_lar = u2_t(lar);
u2_noun pq_lar = u2_h(q_lar);
u2_noun qq_lar = u2_t(q_lar);
u2_noun mew = j2_mcy(Pt6, ut, snub)(wir_r, van, sut, q_gen);
u2_noun yom = _mint_edit
(wir_r, van, sut, mew, p_lar, u2_rx(wir_r, qq_lar), u2_nul);
u2_noun p_yom = u2_h(yom);
u2_noun q_yom = u2_t(yom);
u2_noun ret = u2_bc
(wir_r, _mint_nice(wir_r, van, gol, u2_rx(wir_r, p_yom)),
(_0 == pq_lar) ? u2_rx(wir_r, q_yom)
: u2_bt(wir_r, _9,
u2_rx(wir_r, pq_lar),
u2_rx(wir_r, q_yom)));
u2_rz(wir_r, yom);
u2_rz(wir_r, mew);
u2_rz(wir_r, lar);
return ret;
}
case c3__pmcl: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_mint_used(wir_r);
{

View File

@ -638,6 +638,43 @@
return u2_bc(wir_r, _mull_nice(wir_r, van, gol, p_ret), q_ret);
}
}
case c3__hxts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_mull_used(wir_r);
{
u2_noun sec = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, p_gen);
u2_noun suc = j2_mcy(Pt6, ut, seek)(wir_r, van, dox, c3__read, p_gen);
u2_noun lar = _mull_foil(wir_r, sec);
u2_noun p_lar = u2_h(lar);
u2_noun q_lar = u2_t(lar);
u2_noun pq_lar = u2_h(q_lar);
u2_noun qq_lar = u2_t(q_lar);
u2_noun vug = _mull_foil(wir_r, suc);
u2_noun p_vug = u2_h(vug);
u2_noun q_vug = u2_t(vug);
u2_noun pq_vug = u2_h(q_vug);
u2_noun qq_vug = u2_t(q_vug);
if ( u2_and(u2_sing(p_lar, p_vug), u2_sing(pq_lar, pq_vug)) ) {
u2_bl_error(wir_r, "mull-bonk-e");
}
{
u2_noun mew = j2_mcy(Pt6, ut, snub)(wir_r, van, sut, q_gen);
u2_noun yom = _mull_edit
(wir_r, van, sut, dox, mew, u2_rx(wir_r, qq_lar),
u2_rx(wir_r, qq_vug));
u2_noun von = u2_bn_molt(wir_r, van, j2_ut_van_vet, u2_no, 0);
u2_noun p_ret = j2_mcy(Pt6, ut, fire)(wir_r, van, sut, u2_h(yom));
u2_noun q_ret = j2_mcy(Pt6, ut, fire)(wir_r, von, sut, u2_t(yom));
u2_rz(wir_r, von);
u2_rz(wir_r, yom);
u2_rz(wir_r, mew);
u2_rz(wir_r, vug);
u2_rz(wir_r, lar);
return u2_bc(wir_r, _mull_nice(wir_r, van, gol, p_ret), q_ret);
}
}
case c3__pmcl: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_mull_used(wir_r);
{

View File

@ -355,6 +355,23 @@
return ret;
}
case c3__hxts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
{
u2_noun sec = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, p_gen);
u2_noun lar = _play_foil(wir_r, sec);
u2_noun q_lar = u2_t(lar);
u2_noun qq_lar = u2_t(q_lar);
u2_noun mew = j2_mcy(Pt6, ut, snub)(wir_r, van, sut, q_gen);
u2_noun rag = _play_edit(wir_r, van, sut, mew, u2_rx(wir_r, qq_lar));
u2_noun ret = j2_mcy(Pt6, ut, fire)(wir_r, van, sut, rag);
u2_rz(wir_r, rag);
u2_rz(wir_r, mew);
u2_rz(wir_r, lar);
return ret;
}
case c3__pmcl: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
{

View File

@ -10,6 +10,28 @@
/* functions
*/
u2_noun // produce
j2_mcx(Pt6, ut, snub)(u2_wire wir_r,
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har) // retain
{
if ( u2_no == u2_dust(har) ) {
return u2_nul;
} else {
u2_noun i_har = u2_h(har);
u2_noun t_har = u2_t(har);
u2_noun pi_har = u2_h(i_har);
u2_noun qi_har = u2_t(i_har);
u2_noun peh = j2_mbc(Pt2, flop)(wir_r, pi_har);
u2_noun ret = u2_bc(wir_r, u2_bc(wir_r, peh, u2k(qi_har)),
j2_mcx(Pt6, ut, snub)
(wir_r, van, sut, t_har));
return ret;
}
}
u2_noun // produce
j2_mcx(Pt6, ut, swab)(u2_wire wir_r,
u2_noun van, // retain
@ -36,9 +58,29 @@
/* boilerplate
*/
u2_ho_jet
j2_mcj(Pt6, ut, snub)[];
u2_ho_jet
j2_mcj(Pt6, ut, swab)[];
u2_noun // transfer
j2_mc(Pt6, ut, snub)(u2_wire wir_r,
u2_noun cor) // retain
{
u2_noun van, sut, har;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &har,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
} else {
return j2_mcx(Pt6, ut, snub)(wir_r, van, sut, har);
}
}
u2_noun // transfer
j2_mc(Pt6, ut, swab)(u2_wire wir_r,
u2_noun cor) // retain
@ -56,6 +98,34 @@
}
}
u2_weak // transfer
j2_mci(Pt6, ut, snub)(u2_wire wir_r,
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "snub");
if ( u2_none == hoc ) {
c3_assert(!"register snub");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, har),
0);
if ( (u2_none == j2_mcj(Pt6, ut, snub)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, snub)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
return cor;
}
}
u2_weak // transfer
j2_mci(Pt6, ut, swab)(u2_wire wir_r,
u2_noun van, // retain
@ -84,6 +154,33 @@
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, snub)(u2_wire wir_r,
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har) // retain
{
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, snub)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, snub)(wir_r, van, sut, har);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, snub)(wir_r, van, sut, har);
fol = u2_h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
return pro;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, swab)(u2_wire wir_r,
u2_noun van, // retain
@ -118,3 +215,8 @@
{ ".2", c3__hevy, j2_mc(Pt6, ut, swab), Tier6_c, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt6, ut, snub)[] = {
{ ".2", c3__hevy, j2_mc(Pt6, ut, snub), Tier6_c, u2_none, u2_none },
{ }
};

View File

@ -611,6 +611,12 @@
u2_noun mur, // retain
u2_noun men); // retain
u2_noun // transfer
j2_mcy(Pt6, ut, snub)(u2_wire wir_r,
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har); // retain
u2_noun // transfer
j2_mcy(Pt6, ut, swab)(u2_wire wir_r,
u2_noun van, // retain

View File

@ -482,6 +482,7 @@
# define c3__http c3_s4('h','t','t','p')
# define c3__hume c3_s4('h','u','m','e')
# define c3__hunk c3_s4('h','u','n','k')
# define c3__hxts c3_s4('h','x','t','s')
# define c3__ic c3_s2('i','c')
# define c3__ice c3_s3('i','c','e')
# define c3__if c3_s2('i','f')