コード例 #1
0
ファイル: ut_mint.c プロジェクト: mnemnion/urbit
  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;
    }
  }
コード例 #2
0
ファイル: ut_bust.c プロジェクト: mnemnion/urbit
  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;
    }
  }
コード例 #3
0
ファイル: ut_fink.c プロジェクト: cgyarvin/urbit
  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;
    }
  }
コード例 #4
0
ファイル: ut_tack.c プロジェクト: Gruelty/urbit
  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;
    }
  }
コード例 #5
0
  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;
    }
  }
コード例 #6
0
ファイル: ut_cull.c プロジェクト: mnemnion/urbit
  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;
    }
  }
コード例 #7
0
ファイル: ut_nest.c プロジェクト: mnemnion/urbit
  u2_noun                                                         //  transfer
  j2_mcy(Pt6, ut, nest)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun ref)                              //  retain
  {
    u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, nest)[0];

    if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
      return j2_mcx(Pt6, ut, nest)(wir_r, van, sut, ref);
    }
    else {
      u2_noun cor, fol, pro;

      cor = j2_mci(Pt6, ut, nest)(wir_r, van, sut, ref);
      fol = u2_t(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;
    }
  }
コード例 #8
0
ファイル: ut_nest.c プロジェクト: mnemnion/urbit
  static u2_flag
  _nest_dext(u2_wire wir_r,
             u2_noun van,
             u2_noun sut,
             u2_noun ref,
             u2_noun gil)
  {
    if ( (u2_yes == u2_sing(sut, ref)) ) {
      return u2_yes;
    }

    {
      u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, nest)[0];

      if ( !(jet_j->sat_s & u2_jet_memo) ) {
        return _nest_dext_in(wir_r, van, sut, ref, gil);
      } else {
        c3_m    fun_m = u2_jet_fun_m(jet_j);
        u2_noun pro   = u2_rl_find_cell(wir_r, fun_m, sut, ref);

        if ( u2_none != pro ) {
          return pro;
        }
        else {
          pro = _nest_dext_in(wir_r, van, sut, ref, gil);

          return u2_rl_save_cell(wir_r, fun_m, sut, ref, pro);
        }
      }
    }
  }
コード例 #9
0
ファイル: ut_tack.c プロジェクト: Gruelty/urbit
  u2_noun                                                         //  transfer
  j2_mcy(Pt6, ut, tack)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun peh,                              //  retain
                        u2_noun mur)                              //  retain
  {
    u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, tack)[0];

    if ( jet_j->sat_s == u2_jet_live ) {
      return j2_mcx(Pt6, ut, tack)(wir_r, van, sut, peh, mur);
    }
    else {
      u2_noun cor, fol, pro;

      cor = j2_mci(Pt6, ut, tack)(wir_r, van, sut, peh, mur);
      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;
    }
  }
コード例 #10
0
ファイル: ut_mint.c プロジェクト: mnemnion/urbit
  u2_noun                                                         //  produce
  j2_mcy(Pt6, ut, mint)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun gol,                              //  retain
                        u2_noun gen)                              //  retain
  {
    u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, mint)[0];

    if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
      if ( !(jet_j->sat_s & u2_jet_memo) ) {
        return j2_mcx(Pt6, ut, mint)(wir_r, van, sut, gol, gen);
      }
      else {
        c3_m    fun_m = c3__mint;
        u2_noun vrf   = u2_frag(j2_ut_van_vrf, van);
        u2_noun pro   = u2_rl_find_qual(wir_r, fun_m, vrf, sut, gol, gen);

        if ( u2_none != pro ) {
          return pro;
        }
        else {
          pro = j2_mcx(Pt6, ut, mint)(wir_r, van, sut, gol, gen);

          return u2_rl_save_qual(wir_r, fun_m, vrf, sut, gol, gen, pro);
        }
      }
    }
    else {
      u2_noun cor, fol, pro;

      cor = j2_mci(Pt6, ut, mint)(wir_r, van, sut, gol, gen);
      fol = u2_t(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;
    }
  }
コード例 #11
0
ファイル: ut_fink.c プロジェクト: cgyarvin/urbit
  u2_noun                                                         //  transfer
  j2_mcy(Pt6, ut, fink)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun dep,
                        u2_noun way,                              //  retain
                        u2_noun cog)                              //  retain
  {
    u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, fink)[0];

    if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
      if ( !(jet_j->sat_s & u2_jet_memo) ) {
        return j2_mcx(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);
      }
      else {
        c3_m    fun_m = c3__fink;
        u2_noun pro   = u2_rl_find_qual(wir_r, fun_m, sut, dep, way, cog);

        if ( u2_none != pro ) {
          return pro;
        }
        else {
          pro = j2_mcx(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);

          return u2_rl_save_qual(wir_r, fun_m, sut, dep, way, cog, pro);
        }
      }
    }
    else {
      u2_noun cor, fol, pro;

      cor = j2_mci(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);
      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;
    }
  }
コード例 #12
0
ファイル: ut_cull.c プロジェクト: mnemnion/urbit
  u2_noun                                                         //  transfer
  j2_mcy(Pt6, ut, cull)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_flag pol,                              //  retain
                        u2_noun axe,                              //  retain
                        u2_noun ref)                              //  retain
  {
    u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, cull)[0];

    if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
      if ( !(jet_j->sat_s & u2_jet_memo) ) {
        return j2_mcx(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);
      }
      else {
        c3_m    fun_m = u2_jet_fun_m(jet_j);
        u2_noun pro   = u2_rl_find_qual(wir_r, fun_m, sut, pol, axe, ref);

        if ( u2_none != pro ) {
          return pro;
        }
        else {
          pro = j2_mcx(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);

          return u2_rl_save_qual(wir_r, fun_m, sut, pol, axe, ref, pro);
        }
      }
    }
    else {
      u2_noun cor, fol, pro;

      cor = j2_mci(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);
      fol = u2_t(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;
    }
  }
コード例 #13
0
ファイル: in.c プロジェクト: Gruelty/urbit
*/
#include "all.h"
#include "../pit.h"

/* declarations
*/
  extern u2_ho_jet j2_mcj(Pt4, in, gas)[];
  extern u2_ho_jet j2_mcj(Pt4, in, has)[];
  extern u2_ho_jet j2_mcj(Pt4, in, put)[];
  extern u2_ho_jet j2_mcj(Pt4, in, tap)[];

/* structures
*/
  u2_ho_driver 
  j2_mbd(Pt4, in)[] = {
    { j2_sc(Pt4, in, gas), j2_mcj(Pt4, in, gas), 0, 0, u2_none },
    { j2_sc(Pt4, in, has), j2_mcj(Pt4, in, has), 0, 0, u2_none },
    { j2_sc(Pt4, in, put), j2_mcj(Pt4, in, put), 0, 0, u2_none },
    { j2_sc(Pt4, in, tap), j2_mcj(Pt4, in, tap), 0, 0, u2_none },
    {}
  };

  u2_ho_jet 
  j2_mbj(Pt4, in)[] = {
    { }
  };

  u2_ho_driver
  j2_db(Pt4, in) = 
    { j2_sb(Pt4, in), j2_mbj(Pt4, in), j2_mbd(Pt4, in), 0, u2_none };
コード例 #14
0
      return u2_bl_bail(wir_r, c3__exit);
    }
    else {
      return j2_mcd(Pt5, aesc, de)(wir_r, a, b);
    }
  }

/* structures
*/
  u2_ho_jet
  j2_mcj(Pt5, aesc, en)[] = {
    { ".2", c3__lite, j2_mc(Pt5, aesc, en), Tier5, u2_none, u2_none },
    { }
  };
  u2_ho_jet
  j2_mcj(Pt5, aesc, de)[] = {
    { ".2", c3__lite, j2_mc(Pt5, aesc, de), Tier5, u2_none, u2_none },
    { }
  };

  u2_ho_driver
  j2_mbd(Pt5, aesc)[] = {
    { j2_sc(Pt5, aesc, en), j2_mcj(Pt5, aesc, en), 0, 0, u2_none },
    { j2_sc(Pt5, aesc, de), j2_mcj(Pt5, aesc, de), 0, 0, u2_none },
    { }
  };

  u2_ho_driver
  j2_db(Pt5, aesc) =
    { j2_sb(Pt5, aesc), 0, j2_mbd(Pt5, aesc), 0, u2_none };
コード例 #15
0
ファイル: parse.c プロジェクト: mnemnion/urbit
      return j2_mcx(Pt5, stir, fun)(wir_r, rud, raq, fel, tub);
    }
  }
  u2_ho_jet 
  j2_mcj(Pt5, stir, fun)[] = {
    { ".3", c3__hevy, j2_mc(Pt5, stir, fun), Tier5_b, u2_none, u2_none },
    { }
  };

/* structures
*/
  /* bend
  */
    u2_ho_driver 
    j2_mbd(Pt5, bend)[] = {
      { j2_sc(Pt5, bend, fun), j2_mcj(Pt5, bend, fun), 0, 0, u2_none },
      { }
    };

    u2_ho_driver
    j2_db(Pt5, bend) = { j2_sb(Pt5, bend), 0, j2_mbd(Pt5, bend), 0, u2_none };

  /* cold
  */
    u2_ho_driver 
    j2_mbd(Pt5, cold)[] = {
      { j2_sc(Pt5, cold, fun), j2_mcj(Pt5, cold, fun), 0, 0, u2_none },
      { }
    };

    u2_ho_driver
コード例 #16
0
ファイル: shax.c プロジェクト: aaronlifton/urbit
/* structures
*/
  u2_ho_jet 
  j2_mbj(Pt5, shax)[] = { 
    { ".2", c3__lite, j2_mb(Pt5, shax), Tier5, u2_none, u2_none },
    { }
  };
  u2_ho_jet 
  j2_mbj(Pt5, shas)[] = { 
    { ".2", c3__lite, j2_mb(Pt5, shas), Tier5, u2_none, u2_none },
    { }
  };

  u2_ho_jet 
  j2_mcj(Pt5, og, raw)[] = {
    { ".2", c3__lite, j2_mc(Pt5, og, raw), Tier5, u2_none, u2_none },
    { }
  };

  u2_ho_driver 
  j2_mbd(Pt5, og)[] = {
    { j2_sc(Pt5, og, raw), j2_mcj(Pt5, og, raw), 0, 0, u2_none },
    {}
  };

  u2_ho_driver
  j2_db(Pt5, og) = 
    { j2_sb(Pt5, og), 0, j2_mbd(Pt5, og), 0, u2_none };

コード例 #17
0
ファイル: ut.c プロジェクト: the0ther/urbit
  extern u2_ho_jet j2_mcj(Pt6, ut, nest)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, park)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, peek)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, play)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, rest)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, seek)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, snap)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, swab)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, tack)[];
  extern u2_ho_jet j2_mcj(Pt6, ut, tock)[];

/* structures
*/
  u2_ho_driver 
  j2_mbd(Pt6, ut)[] = {
    { j2_sc(Pt6, ut, bust), j2_mcj(Pt6, ut, bust), 0, 0, u2_none },
    { j2_sc(Pt6, ut, crop), j2_mcj(Pt6, ut, crop), 0, 0, u2_none },
    { j2_sc(Pt6, ut, cull), j2_mcj(Pt6, ut, cull), 0, 0, u2_none },
    { j2_sc(Pt6, ut, find), j2_mcj(Pt6, ut, find), 0, 0, u2_none },
    { j2_sc(Pt6, ut, fink), j2_mcj(Pt6, ut, fink), 0, 0, u2_none },
    { j2_sc(Pt6, ut, fire), j2_mcj(Pt6, ut, fire), 0, 0, u2_none },
    { j2_sc(Pt6, ut, firm), j2_mcj(Pt6, ut, firm), 0, 0, u2_none },
    { j2_sc(Pt6, ut, fish), j2_mcj(Pt6, ut, fish), 0, 0, u2_none },
    { j2_sc(Pt6, ut, fuse), j2_mcj(Pt6, ut, fuse), 0, 0, u2_none },
    { j2_sc(Pt6, ut, gain), j2_mcj(Pt6, ut, gain), 0, 0, u2_none },
    { j2_sc(Pt6, ut, heal), j2_mcj(Pt6, ut, heal), 0, 0, u2_none },
    { j2_sc(Pt6, ut, lose), j2_mcj(Pt6, ut, lose), 0, 0, u2_none },
    { j2_sc(Pt6, ut, mint), j2_mcj(Pt6, ut, mint), 0, 0, u2_none },
    { j2_sc(Pt6, ut, mull), j2_mcj(Pt6, ut, mull), 0, 0, u2_none },
    { j2_sc(Pt6, ut, nest), j2_mcj(Pt6, ut, nest), 0, 0, u2_none },
    { j2_sc(Pt6, ut, park), j2_mcj(Pt6, ut, park), 0, 0, u2_none },