Merge branch 'nextbreach' of github.com:urbit/urbit into nextbreach

This commit is contained in:
C. Guy Yarvin 2014-06-04 21:11:21 -07:00
commit 5819445d02
6 changed files with 84 additions and 80 deletions

View File

@ -24,12 +24,12 @@
mpz_t bas_mp, dar_mp, hol_mp, rad_mp;
if ( u2_no == u2_mean(cor, u2_cv_sam_4, &bas,
u2_cv_sam_5, &min,
u2_cv_sam_3, &par,
u2_cv_sam_6, &rex,
u2_cv_sam_5, &min,
u2_cv_sam_3, &par,
u2_cv_sam_6, &rex,
0) )
{
return u2_bl_bail(wir_r, c3__exit);
return u2_bl_bail(wir_r, c3__exit);
}
while ( 1 ) {
@ -42,7 +42,7 @@
mpz_tdiv_q(rad_mp, hol_mp, bas_mp);
mpz_tdiv_r(dar_mp, hol_mp, bas_mp);
if ( min ) {
min--;
}
@ -50,7 +50,7 @@
u2_rl_mp(hol, dar_mp);
// rex (par =(0 dar) rad rex)
}
}
}
/* structures
*/

View File

@ -15,11 +15,11 @@
u2_atom bas, gop;
u2_noun dug;
if ( u2_no == u2_mean(cor, u2_cv_sam_4, &bas,
u2_cv_sam_5, &gop,
u2_cv_sam_3, &dug,
u2_cv_sam_5, &gop,
u2_cv_sam_3, &dug,
0) )
{
return u2_bl_bail(wir_r, c3__exit);
return u2_bl_bail(wir_r, c3__exit);
}
return 0;

View File

@ -28,7 +28,7 @@
/* { */
/* return u2_bl_bail(wir_r, c3__exit); */
/* } */
return 0;
}
/* structures

View File

@ -12,6 +12,7 @@ union doub {
/* declarations
*/
extern u2_ho_jet j2_mcj(Pt5, rd, sun)[];
extern u2_ho_jet j2_mcj(Pt5, rd, mul)[];
extern u2_ho_jet j2_mcj(Pt5, rd, div)[];
extern u2_ho_jet j2_mcj(Pt5, rd, add)[];
@ -23,6 +24,33 @@ union doub {
/* functions
*/
/* sun
*/
u2_weak
j2_mcd(Pt5, rd, sun)(u2_wire wir_r,
u2_atom a)
{
union doub b;
b.d = (double) u2_chub(0, a);
return u2_ci_chubs(1, &b.c);
}
u2_weak
j2_mc(Pt5, rd, sun)(u2_wire wir_r,
u2_noun cor)
{
u2_noun a;
if (u2_no == u2_mean(cor, u2_cv_sam, &a, 0)
|| u2_no == u2_stud(a)) {
return u2_bl_bail(wir_r, c3__exit);
}
else {
return j2_mcd(Pt5, rd, sun)(wir_r, a);
}
}
/* mul
*/
u2_weak
@ -34,7 +62,7 @@ union doub {
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
e.d = c.d * d.d;
return u2_ci_chubs(1, &e.c);
}
@ -66,7 +94,7 @@ union doub {
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
e.d = c.d / d.d;
return u2_ci_chubs(1, &e.c);
}
@ -98,7 +126,7 @@ union doub {
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
e.d = c.d + d.d;
return u2_ci_chubs(1, &e.c);
}
@ -130,7 +158,7 @@ union doub {
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
e.d = c.d - d.d;
return u2_ci_chubs(1, &e.c);
}
@ -161,7 +189,7 @@ union doub {
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d <= d.d);
}
@ -192,7 +220,7 @@ union doub {
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d < d.d);
}
@ -223,7 +251,7 @@ union doub {
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d >= d.d);
}
@ -254,7 +282,7 @@ union doub {
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d > d.d);
}
@ -277,6 +305,11 @@ union doub {
/* structures
*/
u2_ho_jet
j2_mcj(Pt5, rd, sun)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, sun), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt5, rd, mul)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, mul), Tier5_test, u2_none, u2_none },
@ -320,6 +353,7 @@ union doub {
u2_ho_driver
j2_mbd(Pt5, rd)[] = {
{ j2_sc(Pt5, rd, sun), j2_mcj(Pt5, rd, sun), 0, 0, u2_none },
{ j2_sc(Pt5, rd, mul), j2_mcj(Pt5, rd, mul), 0, 0, u2_none },
{ j2_sc(Pt5, rd, div), j2_mcj(Pt5, rd, div), 0, 0, u2_none },
{ j2_sc(Pt5, rd, add), j2_mcj(Pt5, rd, add), 0, 0, u2_none },

View File

@ -147,7 +147,6 @@
u2_rx(wir_r, q_gen),
u2_bc(wir_r, c3__zpzp, u2_nul));
}
#if 0
_open_do_pq(wthp) // ?-
{
if ( (u2_nul == q_gen) ) {
@ -169,7 +168,6 @@
_open_in_wthp(wir_r, p_gen, tq_gen));
}
}
#endif
_open_do_p(wtpm) // ?&
{
if ( (u2_nul == p_gen) ) {
@ -188,8 +186,7 @@
}
#if 0
_open_do_pqr(wtls) // ?+
{
u2_noun tul = u2_bc(wir_r,
{ u2_noun tul = u2_bc(wir_r,
u2_bc(wir_r, u2_bc(wir_r, c3__bcts, c3__noun),
u2_rx(wir_r, q_gen)),
u2_nul);
@ -211,6 +208,19 @@
/***
****
***/
_open_do_pq(clhp) // :-
{
printf("wongwong!\n");
return u2_bc
(wir_r, u2_rx(wir_r, p_gen),
u2_rx(wir_r, q_gen));
}
_open_do_pq(clcb) // :_
{
return u2_bc
(wir_r, u2_rx(wir_r, q_gen),
u2_rx(wir_r, p_gen));
}
_open_do_pqrs(clkt) // :^
{
return u2_bq
@ -224,7 +234,6 @@
return u2_bt
(wir_r, u2_rx(wir_r, p_gen), u2_rx(wir_r, q_gen), u2_rx(wir_r, r_gen));
}
#if 0
_open_do_p(clsg) // :~
{
if ( (u2_nul == p_gen) ) {
@ -238,7 +247,6 @@
_open_in_clsg(wir_r, tp_gen));
}
}
_open_do_p(cltr) // :*
{
if ( (u2_nul == p_gen) ) {
@ -257,7 +265,6 @@
}
}
}
#endif
/***
****
***/
@ -309,7 +316,6 @@
u2_rx(wir_r, r_gen),
u2_nul));
}
#if 0
_open_do_pqr(cnsg) // %~
{
return u2_bq
@ -318,10 +324,11 @@
u2_rx(wir_r, q_gen),
u2_bo(wir_r,
u2_bc(wir_r,
u2_bc(wir_r, u2_nul, _6),
u2_bo(wir_r,
u2_bc(wir_r, u2_nul, _6)),
u2_rx(wir_r, r_gen))));
}
#endif
/***
****
***/
@ -344,7 +351,6 @@
/***
****
***/
/*
_open_do_pq(sgts) // ~=
{
return u2_bt
@ -352,7 +358,6 @@
u2_bc(wir_r, c3__germ, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
_open_do_pq(sgbr) // ~|
{
return u2_bt
@ -360,13 +365,6 @@
u2_bc(wir_r, c3__yelp, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
_open_do_pq(sgcl) // ~:
{
return u2_bt
(wir_r, c3__sggr,
u2_bq(wir_r, c3__bank, c3__dtzz, u2_blip, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
_open_do_pq(sggl) // ~>
{
return u2_bt
@ -374,36 +372,12 @@
u2_bq(wir_r, c3__sggr, u2_rx(wir_r, p_gen), u2_nul, _1),
u2_rx(wir_r, q_gen));
}
_open_do_pq(sghp) // ~-
{
return u2_bt
(wir_r, c3__sggr,
u2_bq(wir_r, c3__sole, c3__dtzz, u2_blip, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
_open_do_pq(sgdt) // ~.
{
return u2_bc
(wir_r, c3__sgcn,
u2_bq(wir_r,
u2_rx(wir_r, p_gen),
u2_bc(wir_r, u2_nul, _4),
u2_nul,
u2_rx(wir_r, q_gen)));
}
_open_do_pq(sgbc) // ~$
{
return u2_bt(wir_r, c3__sggr,
u2_bq(wir_r, c3__live,
c3__dtzz, u2_blip, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
_open_do_pq(sghx) // ~#
{
return u2_bt(wir_r, c3__sggr,
u2_bq(wir_r, c3__ping,
c3__dtzz, u2_blip, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
static u2_noun
_sgcn_a(u2_wire wir_r,
@ -448,7 +422,6 @@
u2_bq(wir_r, c3__memo, c3__dtzz, u2_blip, u2_rx(wir_r, p_gen)),
u2_rx(wir_r, q_gen));
}
*/
/***
****
***/
@ -560,19 +533,21 @@
_open_p (brhp);
_open_p (brdt);
_open_pq (clcb);
_open_pq (clhp);
_open_pqrs(clkt);
_open_pqr (clls);
// _open_p (cltr);
// _open_p (clsg);
_open_p (cltr);
_open_p (clsg);
_open_pqr (wtdt);
_open_pq (wtgl);
_open_p (wtzp);
_open_p (wtbr);
_open_p (wtpm);
// _open_pqr (wtls);
// _open_pqr (wtls);
// _open_pqr (wtsg);
// _open_pq (wthp);
_open_pq (wthp);
_open_pq (wtgr);
_open_pq (cncl);
@ -580,22 +555,17 @@
_open_pqrs(cnkt);
_open_pq (cnhp);
_open_pqr (cnls);
// _open_pqr (cnsg);
_open_pqr (cnsg);
_open_pq (brkt);
/*
_open_pq (sgts);
_open_pq (sgbr);
_open_pq (sgcl);
_open_pq (sggl);
_open_pq (sghp);
_open_pq (sgdt);
_open_pq (sgbc);
_open_pq (sghx);
_open_pqrs(sgcn);
_open_pq (sgls);
*/
_open_pq (sgts);
_open_pq (sgbr);
_open_pq (sggl);
_open_pq (sgbc);
_open_pqrs(sgcn);
_open_pq (sgls);
_open_pq (smcl);
// _open_p (smdq);
// _open_pq (smsg);
@ -880,4 +850,3 @@
j2_mbd(Pt6, ap)[] = {
{ }
};

View File

@ -171,6 +171,7 @@
# define c3__clap c3_s4('c','l','a','p')
# define c3__clat c3_s4('c','l','a','t')
# define c3__clay c3_s4('c','l','a','y')
# define c3__clcb c3_s4('c','l','c','b')
# define c3__clep c3_s4('c','l','e','p')
# define c3__clet c3_s4('c','l','e','t')
# define c3__clhp c3_s4('c','l','h','p')