mirror of
https://github.com/urbit/ares.git
synced 2024-12-24 05:44:36 +03:00
wip: debugging stew
This commit is contained in:
parent
1b26b00dc2
commit
dd13cba5df
@ -454,19 +454,19 @@ pub const URBIT_HOT_STATE: &[HotEntry] = &[
|
||||
jet_stir,
|
||||
),
|
||||
//
|
||||
// (
|
||||
// &[
|
||||
// K_139,
|
||||
// Left(b"one"),
|
||||
// Left(b"two"),
|
||||
// Left(b"tri"),
|
||||
// Left(b"qua"),
|
||||
// Left(b"stew"),
|
||||
// Left(b"fun"),
|
||||
// ],
|
||||
// 1,
|
||||
// jet_stew,
|
||||
// ),
|
||||
(
|
||||
&[
|
||||
K_139,
|
||||
Left(b"one"),
|
||||
Left(b"two"),
|
||||
Left(b"tri"),
|
||||
Left(b"qua"),
|
||||
Left(b"stew"),
|
||||
Left(b"fun"),
|
||||
],
|
||||
1,
|
||||
jet_stew,
|
||||
),
|
||||
//
|
||||
(
|
||||
&[
|
||||
|
@ -292,6 +292,7 @@ pub fn jet_stir(context: &mut Context, subject: Noun) -> Result {
|
||||
}
|
||||
|
||||
fn stew_wor(ort: Noun, wan: Noun) -> result::Result<bool, JetErr> {
|
||||
eprintln!("stew_wor\r");
|
||||
if !ort.as_atom()?.is_direct() {
|
||||
return Err(JetErr::Fail(Error::Deterministic(D(0))));
|
||||
} else {
|
||||
@ -301,6 +302,7 @@ fn stew_wor(ort: Noun, wan: Noun) -> result::Result<bool, JetErr> {
|
||||
} else {
|
||||
let ort_dat = ort.as_direct()?.data();
|
||||
let wan_dat = wan.as_direct()?.data();
|
||||
eprintln!("stew wor: done\r");
|
||||
return Ok(ort_dat < wan_dat);
|
||||
}
|
||||
} else {
|
||||
@ -311,6 +313,7 @@ fn stew_wor(ort: Noun, wan: Noun) -> result::Result<bool, JetErr> {
|
||||
} else {
|
||||
let ort_dat = ort.as_direct()?.data();
|
||||
let h_wan_dat = h_wan.as_direct()?.data();
|
||||
eprintln!("stew wor: done\r");
|
||||
return Ok(ort_dat < h_wan_dat);
|
||||
}
|
||||
}
|
||||
@ -361,6 +364,7 @@ pub fn jet_stew(context: &mut Context, subject: Noun) -> Result {
|
||||
}
|
||||
|
||||
if bit {
|
||||
eprintln!("jet_stew: bit slam\r");
|
||||
return slam(context, qn_hel, tub);
|
||||
} else {
|
||||
if stew_wor(iq_tub, pn_hel)? {
|
||||
|
Loading…
Reference in New Issue
Block a user