Example #1
0
  u2_weak                                                         //  transfer
  j2_mci(Pt6, ut, bust)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain 
                        u2_noun dib)                              //  retain
  {
    u2_weak hoc = u2_ds_look(wir_r, van, "bust");

    if ( u2_none == hoc ) {
      c3_assert(!"register bust");
      return u2_none;
    } else {
      u2_weak von = u2_rl_molt(wir_r, van, u2_cw_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_cw_sam, u2_rx(wir_r, dib), 0);

      if ( (u2_none == j2_mcj(Pt6, ut, bust)[0].xip) ) {
        u2_noun xip = u2_ds_find(wir_r, cor);
     
        c3_assert(u2_none != xip);
        j2_mcj(Pt6, ut, bust)[0].xip = xip;
      }
      u2_rl_lose(wir_r, gat);
      return cor;
    }
  }
Example #2
0
  u2_weak                                                         //  transfer
  j2_mci(Pt6, ut, tack)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun peh,                              //  retain
                        u2_noun mur)                              //  retain
  {
    u2_weak hoc = u2_ds_look(wir_r, van, "tack");

    if ( u2_none == hoc ) {
      c3_assert(!"register tack");
      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_2, u2_rx(wir_r, peh), 
                                           u2_cv_sam_3, u2_rx(wir_r, mur),
                                           0);

      if ( (u2_none == j2_mcj(Pt6, ut, tack)[0].xip) ) {
        u2_noun xip = u2_ds_find(wir_r, cor);
     
        c3_assert(u2_none != xip);
        j2_mcj(Pt6, ut, tack)[0].xip = xip;
      }
      u2_rl_lose(wir_r, gat);
      return cor;
    }
  }
Example #3
0
  u2_weak                                                         //  transfer
  j2_mci(Pt6, ut, fink)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain 
                        u2_noun dep,                              //  retain
                        u2_noun way,                              //  retain
                        u2_noun cog)                              //  retain
  {
    u2_weak hoc = u2_ds_look(wir_r, van, "fink");

    if ( u2_none == hoc ) {
      c3_assert(!"register fink");
      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_2, u2_rx(wir_r, dep), 
                                      u2_cv_sam_6, u2_rx(wir_r, way), 
                                      u2_cv_sam_7, u2_rx(wir_r, cog), 
                                      0);

      if ( (u2_none == j2_mcj(Pt6, ut, fink)[0].xip) ) {
        u2_noun xip = u2_ds_find(wir_r, cor);
     
        c3_assert(u2_none != xip);
        j2_mcj(Pt6, ut, fink)[0].xip = xip;
      }
      u2_rl_lose(wir_r, gat);
      return cor;
    }
  }
  u2_bean
  j2_mci(Pt6, ut, park)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun way,                              //  retain
                        u2_noun axe)                              //  retain
  {
    u2_weak hoc = u2_ds_look(wir_r, van, "park");

    if ( u2_none == hoc ) {
      c3_assert(!"register park");
      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_2, u2_rx(wir_r, way),
                                      u2_cv_sam_3, u2_rx(wir_r, axe),
                                      0);

      if ( (u2_none == j2_mcj(Pt6, ut, park)[0].xip) ) {
        u2_noun xip = u2_ds_find(wir_r, cor);

        c3_assert(u2_none != xip);
        j2_mcj(Pt6, ut, park)[0].xip = xip;
      }
      u2_rl_lose(wir_r, gat);
      return cor;
    }
  }
Example #5
0
  u2_weak                                                         //  produce
  j2_mci(Pt6, ut, mint)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain 
                        u2_noun gol,                              //  retain
                        u2_noun gen)                              //  retain
  {
    u2_weak hoc = u2_ds_look(wir_r, van, "mint");

    if ( u2_none == hoc ) {
      c3_assert(!"register mint");
      return u2_none;
    } else {
      u2_weak von = u2_rl_molt(wir_r, van, u2_cw_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_cw_sam_2, u2_rx(wir_r, gol), 
                                      u2_cw_sam_3, u2_rx(wir_r, gen), 
                                      0);

      if ( (u2_none == j2_mcj(Pt6, ut, mint)[0].xip) ) {
        u2_noun xip = u2_ds_find(wir_r, cor);
     
        c3_assert(u2_none != xip);
        j2_mcj(Pt6, ut, mint)[0].xip = xip;
      }
      u2_rl_lose(wir_r, gat);
      return cor;
    }
  }
Example #6
0
  u2_weak                                                         //  transfer
  j2_mci(Pt6, ut, cull)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain 
                        u2_flag pol,                              //  retain
                        u2_atom axe,                              //  retain
                        u2_noun ref)                              //  retain
  {
    u2_weak hoc = u2_ds_look(wir_r, van, "cull");

    if ( u2_none == hoc ) {
      c3_assert(!"register cull");
      return u2_none;
    } else {
      u2_weak von = u2_rl_molt(wir_r, van, u2_cw_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_cw_sam_2, pol,
                                      u2_cw_sam_6, u2_rx(wir_r, axe), 
                                      u2_cw_sam_7, u2_rx(wir_r, ref), 
                                      0);

      if ( (u2_none == j2_mcj(Pt6, ut, cull)[0].xip) ) {
        u2_noun xip = u2_ds_find(wir_r, cor);
     
        c3_assert(u2_none != xip);
        j2_mcj(Pt6, ut, cull)[0].xip = xip;
      }
      u2_rl_lose(wir_r, gat);
      return cor;
    }
  }
Example #7
0
File: nock.c Project: sillsm/urbit
/* u2_nk_nock():
**
**   Compute `(nock bus fol)`.
*/
u2_weak                                                           //  transfer
u2_nk_nock(u2_wire wir_r,
           u2_weak bus,                                           //  transfer
           u2_weak fol)                                           //  retain
{
    if ( u2_none == fol ) {
        u2_rl_lose(wir_r, bus);
        return u2_none;
    }
    else if ( u2_none == bus ) {
        return u2_none;
    }
    else {
        return u2_nk_soft(wir_r, bus, fol);
    }
}