mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 03:00:15 +03:00
Eliminate %wtcn in favor of %wtts.
This commit is contained in:
parent
5d51ceff35
commit
0b38cd36c5
1
Makefile
1
Makefile
@ -173,6 +173,7 @@ J191_5_OFILES=\
|
||||
gen191/5/trip.o
|
||||
|
||||
J191_6_OFILES=\
|
||||
gen191/6/al.o \
|
||||
gen191/6/ap.o \
|
||||
gen191/6/bull.o \
|
||||
gen191/6/cell.o \
|
||||
|
2
f/dash.c
2
f/dash.c
@ -66,9 +66,11 @@ u2_ds_find(u2_wire wir_r,
|
||||
}
|
||||
else out = _ds_scan(pug, cor);
|
||||
|
||||
#if 0
|
||||
if ( (u2_none == out) && (u2_none != pug) ) {
|
||||
fprintf(stderr, "half match\r\n");
|
||||
}
|
||||
#endif
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
52
gen191/6/al.c
Normal file
52
gen191/6/al.c
Normal file
@ -0,0 +1,52 @@
|
||||
/* j/6/al.c
|
||||
**
|
||||
** This file is in the public domain.
|
||||
*/
|
||||
#include "all.h"
|
||||
#include "../pit.h"
|
||||
|
||||
/* ~(. al gen)
|
||||
*/
|
||||
static u2_noun
|
||||
_al_core(u2_wire wir_r,
|
||||
u2_noun van,
|
||||
u2_noun gen)
|
||||
{
|
||||
u2_noun ter = u2_frag(u2_cv_con_3, van);
|
||||
u2_weak hoc = u2_ds_look(wir_r, ter, "al");
|
||||
|
||||
if ( u2_none == hoc ) {
|
||||
return u2_cm_bail(c3__fail);
|
||||
}
|
||||
else {
|
||||
u2_noun gat = u2_nk_soft(wir_r, u2_rx(wir_r, ter), hoc);
|
||||
u2_noun cor = u2_rl_molt(wir_r, gat,
|
||||
u2_cv_sam, u2_rx(wir_r, gen),
|
||||
0);
|
||||
|
||||
u2_rz(wir_r, hoc);
|
||||
u2_rz(wir_r, gat);
|
||||
|
||||
return cor;
|
||||
}
|
||||
}
|
||||
|
||||
/* ~(bunt al gen)
|
||||
*/
|
||||
u2_noun // transfer
|
||||
j2_mcy(Pt6, al, bunt)(u2_wire wir_r,
|
||||
u2_noun van, // retain
|
||||
u2_noun gen) // retain
|
||||
{
|
||||
u2_noun cor = _al_core(wir_r, van, gen);
|
||||
u2_weak hoc = u2_ds_look(wir_r, cor, "bunt");
|
||||
|
||||
if ( u2_none == hoc ) {
|
||||
return u2_cm_bail(c3__fail);
|
||||
} else {
|
||||
u2_noun pro = u2_nk_soft(wir_r, cor, hoc);
|
||||
|
||||
u2_rz(wir_r, hoc);
|
||||
return pro;
|
||||
}
|
||||
}
|
@ -418,6 +418,24 @@
|
||||
u2_rl_lose(wir_r, wam);
|
||||
return ret;
|
||||
}
|
||||
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_mint_used(wir_r);
|
||||
{
|
||||
u2_noun nob = j2_mcy(Pt6, al, bunt)(wir_r, van, p_gen);
|
||||
u2_noun vol = _mint_corn(wir_r, van, sut, q_gen);
|
||||
u2_noun axe = _mint_coke(wir_r, vol);
|
||||
u2_noun wam = j2_mcy(Pt6, ut, play)(wir_r, van, sut, nob);
|
||||
|
||||
ret = u2_bc
|
||||
(wir_r,
|
||||
_mint_nice(wir_r, van, gol, _mint_bean(wir_r)),
|
||||
j2_mcy(Pt6, ut, fish)(wir_r, van, wam, axe));
|
||||
|
||||
u2_rl_lose(wir_r, axe);
|
||||
u2_rl_lose(wir_r, wam);
|
||||
u2_rl_lose(wir_r, nob);
|
||||
return ret;
|
||||
}
|
||||
case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen);
|
||||
_mint_used(wir_r);
|
||||
{
|
||||
|
@ -371,6 +371,29 @@
|
||||
|
||||
return _mull_both(wir_r, van, gol, _mull_bean(wir_r));
|
||||
}
|
||||
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_mull_used(wir_r);
|
||||
{
|
||||
u2_noun nob = j2_mcy(Pt6, al, bunt)(wir_r, van, p_gen);
|
||||
u2_noun p_waz = j2_mcy(Pt6, ut, play)(wir_r, van, sut, nob);
|
||||
u2_noun q_waz = j2_mcy(Pt6, ut, play)(wir_r, van, dox, nob);
|
||||
u2_noun p_syx = _mull_doke(wir_r, van, sut, q_gen);
|
||||
u2_noun q_syx = _mull_doke(wir_r, van, dox, q_gen);
|
||||
u2_noun p_pov = j2_mcy(Pt6, ut, fish)(wir_r, van, p_waz, p_syx);
|
||||
u2_noun q_pov = j2_mcy(Pt6, ut, fish)(wir_r, van, q_waz, q_syx);
|
||||
|
||||
if ( (u2_no == u2_sing(p_syx, q_syx)) ||
|
||||
(u2_no == u2_sing(p_pov, q_pov)) )
|
||||
{
|
||||
return u2_bl_error(wir_r, "mull-bonk-b");
|
||||
}
|
||||
u2_rz(wir_r, p_waz); u2_rz(wir_r, q_waz);
|
||||
u2_rz(wir_r, p_syx); u2_rz(wir_r, q_syx);
|
||||
u2_rz(wir_r, p_pov); u2_rz(wir_r, q_pov);
|
||||
u2_rz(wir_r, nob);
|
||||
|
||||
return _mull_both(wir_r, van, gol, _mull_bean(wir_r));
|
||||
}
|
||||
case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen);
|
||||
_mull_used(wir_r);
|
||||
{
|
||||
|
@ -202,6 +202,11 @@
|
||||
{
|
||||
return _play_bean(wir_r);
|
||||
}
|
||||
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_play_used(wir_r);
|
||||
{
|
||||
return _play_bean(wir_r);
|
||||
}
|
||||
case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen);
|
||||
_play_used(wir_r);
|
||||
{
|
||||
|
@ -444,6 +444,11 @@
|
||||
u2_noun ter, // retain
|
||||
u2_noun gen); // retain
|
||||
|
||||
u2_noun // transfer
|
||||
j2_mcy(Pt6, al, bunt)(u2_wire wir_r,
|
||||
u2_noun van, // retain
|
||||
u2_noun gen); // retain
|
||||
|
||||
u2_noun // transfer
|
||||
j2_mcy(Pt6, ap, rake)(u2_wire wir_r,
|
||||
u2_noun gen); // retain
|
||||
|
Loading…
Reference in New Issue
Block a user