Merge branch 'release/next-vere' into na-release/next-vere

* release/next-vere:
  u3: adds ghetto +mook replacement
  u3: moves |ut battery to the rightmost cache key position
  u3: adds |ut battery to jet cache keys
This commit is contained in:
Joe Bryan 2020-11-20 15:54:10 -08:00
commit 2cf861e79b
10 changed files with 91 additions and 50 deletions

View File

@ -18,6 +18,7 @@
u3_noun u3z_key_2(c3_m, u3_noun, u3_noun);
u3_noun u3z_key_3(c3_m, u3_noun, u3_noun, u3_noun);
u3_noun u3z_key_4(c3_m, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3z_key_5(c3_m, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
/* u3z_find*(): find in memo cache. Arguments retained
*/

View File

@ -6,16 +6,18 @@
u3_noun
u3wfu_crop(u3_noun cor)
{
u3_noun sut, ref, van;
u3_noun bat, sut, ref, van;
if ( (c3n == u3r_mean(cor, u3x_sam, &ref, u3x_con, &van, 0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
if ( (c3n == u3r_mean(cor, u3x_sam, &ref, u3x_con, &van, 0))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__crop + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun key = u3z_key_2(fun_m, sut, ref);
u3_weak vet = u3r_at(u3qfu_van_vet, van);
c3_m fun_m = 141 + c3__crop + ((!!vet) << 8);
u3_noun key = u3z_key_3(fun_m, sut, ref, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -6,17 +6,19 @@
u3_noun
u3wfu_fish(u3_noun cor)
{
u3_noun sut, axe, van;
u3_noun bat, sut, axe, van;
if ( (c3n == u3r_mean(cor, u3x_sam, &axe, u3x_con, &van, 0)) ||
(c3n == u3ud(axe)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
if ( (c3n == u3r_mean(cor, u3x_sam, &axe, u3x_con, &van, 0))
|| (c3n == u3ud(axe))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__fish + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun key = u3z_key_2(fun_m, sut, axe);
u3_weak vet = u3r_at(u3qfu_van_vet, van);
c3_m fun_m = 141 + c3__fish + ((!!vet) << 8);
u3_noun key = u3z_key_3(fun_m, sut, axe, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -6,16 +6,18 @@
u3_noun
u3wfu_fuse(u3_noun cor)
{
u3_noun sut, ref, van;
u3_noun bat, sut, ref, van;
if ( (c3n == u3r_mean(cor, u3x_sam, &ref, u3x_con, &van, 0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
if ( (c3n == u3r_mean(cor, u3x_sam, &ref, u3x_con, &van, 0))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__fuse + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun key = u3z_key_2(fun_m, sut, ref);
u3_weak vet = u3r_at(u3qfu_van_vet, van);
c3_m fun_m = 141 + c3__fuse + ((!!vet) << 8);
u3_noun key = u3z_key_3(fun_m, sut, ref, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -6,20 +6,20 @@
u3_noun
u3wfu_mint(u3_noun cor)
{
u3_noun sut, gol, gen, van;
u3_noun bat, sut, gol, gen, van;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &gol,
u3x_sam_3, &gen,
u3x_con, &van,
0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
u3x_con, &van, 0))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__mint;
u3_noun vrf = u3r_at(u3qfu_van_vrf, van);
u3_noun key = u3z_key_4(fun_m, vrf, sut, gol, gen);
u3_noun key = u3z_key_5(fun_m, vrf, sut, gol, gen, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -6,20 +6,21 @@
u3_noun
u3wfu_mull(u3_noun cor)
{
u3_noun sut, gol, dox, gen, van;
u3_noun bat, sut, gol, dox, gen, van;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &gol,
u3x_sam_6, &dox,
u3x_sam_7, &gen,
u3x_con, &van,
0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
u3x_con, &van, 0))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__mull + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun key = u3z_key_4(fun_m, sut, gol, dox, gen);
u3_weak vet = u3r_at(u3qfu_van_vet, van);
c3_m fun_m = 141 + c3__mull + ((!!vet) << 8);
u3_noun key = u3z_key_5(fun_m, sut, gol, dox, gen, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -7,24 +7,24 @@ u3_noun
u3wfu_nest_dext(u3_noun dext_core)
{
u3_noun nest_in_core, nest_core;
u3_noun sut, ref, van, seg, reg, gil;
u3_noun bat, sut, ref, van, seg, reg, gil;
if ( (u3_none == (nest_in_core = u3r_at(3, dext_core))) ||
(c3n == u3r_mean(nest_in_core, u3x_sam_2, &seg,
if ( (u3_none == (nest_in_core = u3r_at(3, dext_core)))
|| (c3n == u3r_mean(nest_in_core, u3x_sam_2, &seg,
u3x_sam_6, &reg,
u3x_sam_7, &gil,
7, &nest_core,
0)) ||
(c3n == u3r_mean(nest_core, u3x_sam_3, &ref,
u3x_con, &van,
0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
u3x_con, &nest_core, 0))
|| (c3n == u3r_mean(nest_core, u3x_sam_3, &ref,
u3x_con, &van, 0))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__dext + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun key = u3z_key_2(fun_m, sut, ref);
u3_weak vet = u3r_at(u3qfu_van_vet, van);
c3_m fun_m = 141 + c3__dext + ((!!vet) << 8);
u3_noun key = u3z_key_3(fun_m, sut, ref, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -6,16 +6,18 @@
u3_noun
u3wfu_rest(u3_noun cor)
{
u3_noun sut, leg, van;
u3_noun bat, sut, leg, van;
if ( (c3n == u3r_mean(cor, u3x_sam, &leg, u3x_con, &van, 0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
if ( (c3n == u3r_mean(cor, u3x_sam, &leg, u3x_con, &van, 0))
|| (u3_none == (bat = u3r_at(u3x_bat, van)))
|| (u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
}
else {
c3_m fun_m = 141 + c3__rest + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun key = u3z_key_2(fun_m, sut, leg);
u3_weak vet = u3r_at(u3qfu_van_vet, van);
c3_m fun_m = 141 + c3__rest + ((!!vet) << 8);
u3_noun key = u3z_key_3(fun_m, sut, leg, bat);
u3_weak pro = u3z_find(key);
if ( u3_none != pro ) {

View File

@ -1215,6 +1215,32 @@ u3m_soft(c3_w mil_w,
// XX produce specific error motes instead of %2?
//
if ( 0 == u3A->roc ) {
{
u3_noun tax = u3t(u3t(why));
u3m_p("mote", u3h(u3t(why)));
while ( u3_nul != tax ) {
u3_noun dat, mot, val;
u3x_cell(tax, &dat, &tax);
if ( c3y == u3r_cell(dat, &mot, &val) ) {
if ( c3__spot == mot ) {
u3m_p("tax", val);
}
else if ( (c3__mean == mot)
&& (c3y == u3a_is_atom(val)) )
{
u3m_p("men", val);
}
else {
u3m_p("mot", mot);
}
}
}
}
u3z(why);
return u3nc(c3__fail, u3_nul);
}

View File

@ -25,6 +25,11 @@ u3z_key_4(c3_m fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun qua)
{
return u3nc(fun, u3nq(u3k(one), u3k(two), u3k(tri), u3k(qua)));
}
u3_noun
u3z_key_5(c3_m fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun qua, u3_noun qin)
{
return u3nc(fun, u3nq(u3k(one), u3k(two), u3k(tri), u3nc(u3k(qua), u3k(qin))));
}
/* u3z_find(): find in memo cache. Arguments retained.
*/