mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 11:09:30 +03:00
Add k versions for the mix, rep and rip jets.
This makes upcoming work a bit easier.
This commit is contained in:
parent
ed038d8925
commit
5189295d02
@ -18,6 +18,11 @@
|
||||
|
||||
/* u3kc: tier 3 functions
|
||||
*/
|
||||
/* u3kc_mix(): binary xor.
|
||||
*/
|
||||
u3_noun
|
||||
u3kc_mix(u3_atom a, u3_atom b);
|
||||
|
||||
/* u3kc_lsh(): left shift.
|
||||
*/
|
||||
u3_noun
|
||||
@ -28,6 +33,16 @@
|
||||
u3_noun
|
||||
u3kc_rsh(u3_noun a, u3_noun b, u3_noun c);
|
||||
|
||||
/* u3kc_rep(): assemble single.
|
||||
*/
|
||||
u3_noun
|
||||
u3kc_rep(u3_atom a, u3_noun b);
|
||||
|
||||
/* u3kc_rip(): disassemble.
|
||||
*/
|
||||
u3_noun
|
||||
u3kc_rip(u3_atom a, u3_atom b);
|
||||
|
||||
/* u3kd: tier 4 functions
|
||||
*/
|
||||
/* u3kdb_get(): map get for key `b` in map `a` with u3_none.
|
||||
|
@ -48,4 +48,11 @@
|
||||
return u3qc_mix(a, b);
|
||||
}
|
||||
}
|
||||
|
||||
u3_noun
|
||||
u3kc_mix(u3_atom a,
|
||||
u3_atom b)
|
||||
{
|
||||
u3_noun res = u3qc_mix(a, b);
|
||||
u3z(a); u3z(b);
|
||||
return res;
|
||||
}
|
||||
|
@ -84,4 +84,11 @@
|
||||
return pro;
|
||||
}
|
||||
}
|
||||
|
||||
u3_noun
|
||||
u3kc_rep(u3_atom a,
|
||||
u3_noun b)
|
||||
{
|
||||
u3_noun res = u3qc_rep(a, b);
|
||||
u3z(a); u3z(b);
|
||||
return res;
|
||||
}
|
||||
|
@ -81,3 +81,12 @@
|
||||
return u3qc_rip(a, b);
|
||||
}
|
||||
}
|
||||
u3_noun
|
||||
u3kc_rip(u3_atom a,
|
||||
u3_atom b)
|
||||
{
|
||||
u3_noun res = u3qc_rip(a, b);
|
||||
|
||||
u3z(a); u3z(b);
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user