Merge branch 'master' of github.com:urbit/urbit

Conflicts:
	urb/urbit.pill
This commit is contained in:
C. Guy Yarvin 2014-06-03 11:25:12 -07:00
commit f4acd72d90
2 changed files with 154 additions and 1 deletions

View File

@ -16,6 +16,10 @@ union doub {
extern u2_ho_jet j2_mcj(Pt5, rd, div)[];
extern u2_ho_jet j2_mcj(Pt5, rd, add)[];
extern u2_ho_jet j2_mcj(Pt5, rd, sub)[];
extern u2_ho_jet j2_mcj(Pt5, rd, lte)[];
extern u2_ho_jet j2_mcj(Pt5, rd, lth)[];
extern u2_ho_jet j2_mcj(Pt5, rd, gte)[];
extern u2_ho_jet j2_mcj(Pt5, rd, gth)[];
/* functions
*/
@ -147,6 +151,130 @@ union doub {
}
}
/* lte
*/
u2_weak
j2_mcd(Pt5, rd, lte)(u2_wire wir_r,
u2_atom a,
u2_atom b)
{
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d <= d.d);
}
u2_weak
j2_mc(Pt5, rd, lte)(u2_wire wir_r,
u2_noun cor)
{
u2_noun a, b;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ||
u2_no == u2_stud(a) ||
u2_no == u2_stud(b) )
{
return u2_bl_bail(wir_r, c3__exit);
}
else {
return j2_mcd(Pt5, rd, lte)(wir_r, a, b);
}
}
/* lth
*/
u2_weak
j2_mcd(Pt5, rd, lth)(u2_wire wir_r,
u2_atom a,
u2_atom b)
{
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d < d.d);
}
u2_weak
j2_mc(Pt5, rd, lth)(u2_wire wir_r,
u2_noun cor)
{
u2_noun a, b;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ||
u2_no == u2_stud(a) ||
u2_no == u2_stud(b) )
{
return u2_bl_bail(wir_r, c3__exit);
}
else {
return j2_mcd(Pt5, rd, lth)(wir_r, a, b);
}
}
/* gte
*/
u2_weak
j2_mcd(Pt5, rd, gte)(u2_wire wir_r,
u2_atom a,
u2_atom b)
{
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d >= d.d);
}
u2_weak
j2_mc(Pt5, rd, gte)(u2_wire wir_r,
u2_noun cor)
{
u2_noun a, b;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ||
u2_no == u2_stud(a) ||
u2_no == u2_stud(b) )
{
return u2_bl_bail(wir_r, c3__exit);
}
else {
return j2_mcd(Pt5, rd, gte)(wir_r, a, b);
}
}
/* gth
*/
u2_weak
j2_mcd(Pt5, rd, gth)(u2_wire wir_r,
u2_atom a,
u2_atom b)
{
union doub c, d;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
return u2_say(c.d > d.d);
}
u2_weak
j2_mc(Pt5, rd, gth)(u2_wire wir_r,
u2_noun cor)
{
u2_noun a, b;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ||
u2_no == u2_stud(a) ||
u2_no == u2_stud(b) )
{
return u2_bl_bail(wir_r, c3__exit);
}
else {
return j2_mcd(Pt5, rd, gth)(wir_r, a, b);
}
}
/* structures
*/
u2_ho_jet
@ -169,6 +297,26 @@ union doub {
{ ".2", c3__lite, j2_mc(Pt5, rd, sub), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt5, rd, lte)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, lte), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt5, rd, lth)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, lth), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt5, rd, gte)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, gte), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt5, rd, gth)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, gth), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_driver
j2_mbd(Pt5, rd)[] = {
@ -176,6 +324,10 @@ union doub {
{ 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 },
{ j2_sc(Pt5, rd, sub), j2_mcj(Pt5, rd, sub), 0, 0, u2_none },
{ j2_sc(Pt5, rd, lte), j2_mcj(Pt5, rd, lte), 0, 0, u2_none },
{ j2_sc(Pt5, rd, lth), j2_mcj(Pt5, rd, lth), 0, 0, u2_none },
{ j2_sc(Pt5, rd, gte), j2_mcj(Pt5, rd, gte), 0, 0, u2_none },
{ j2_sc(Pt5, rd, gth), j2_mcj(Pt5, rd, gth), 0, 0, u2_none },
{ }
};

View File

@ -1474,7 +1474,7 @@ _raft_lame(u2_reck* rec_u, u2_noun ovo, u2_noun why, u2_noun tan)
{
u2_noun bov, gon;
#if 1
#if 0
{
c3_c* oik_c = u2_cr_string(u2h(u2t(ovo)));
@ -1525,6 +1525,7 @@ _raft_lame(u2_reck* rec_u, u2_noun ovo, u2_noun why, u2_noun tan)
u2z(vab);
uL(fprintf(uH, "crude: all delivery failed!\n"));
c3_assert(!"crud");
}
}
}