mirror of
https://github.com/urbit/ares.git
synced 2024-12-23 05:12:15 +03:00
jets: +rep:by
fix, and link to +rep:in
too
This commit is contained in:
parent
a18f94a8d3
commit
1734fb1c0d
@ -229,6 +229,11 @@ pub const URBIT_HOT_STATE: &[HotEntry] = &[
|
||||
1,
|
||||
jet_by_rep,
|
||||
),
|
||||
(
|
||||
&[K_139, Left(b"one"), Left(b"two"), Left(b"in"), Left(b"rep")],
|
||||
1,
|
||||
jet_by_rep, // +rep:in has the same signature as +rep:by
|
||||
),
|
||||
//
|
||||
(
|
||||
&[
|
||||
|
@ -9,16 +9,17 @@ crate::gdb!();
|
||||
|
||||
fn by_rep(context: &mut Context, tree: Noun, site: &Site, out: &mut Noun) {
|
||||
if unsafe { tree.raw_equals(D(0)) } {
|
||||
} else {
|
||||
let node = slot(tree, 2).unwrap();
|
||||
let left = slot(node, 6).unwrap();
|
||||
let rite = slot(node, 7).unwrap();
|
||||
|
||||
} else if let Ok(node) = slot(tree, 2) {
|
||||
let acc = T(&mut context.stack, &[node, *out]);
|
||||
*out = site_slam(context, site, acc);
|
||||
|
||||
by_rep(context, left, site, out);
|
||||
by_rep(context, rite, site, out);
|
||||
if let Ok(left) = slot(tree, 6) {
|
||||
by_rep(context, left, site, out);
|
||||
}
|
||||
|
||||
if let Ok(rite) = slot(tree, 7) {
|
||||
by_rep(context, rite, site, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user