Skip to content

Commit

Permalink
ares: add %hand, %hunk, %lose, and %mean hints
Browse files Browse the repository at this point in the history
  • Loading branch information
ashelkovnykov committed Jun 22, 2023
1 parent fdcbf74 commit c163400
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/ares/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn interpret(
*(stack.local_noun_pointer(0)) = work_to_noun(Done);
}
push_formula(stack, formula);

assert_no_alloc(|| unsafe {
loop {
match noun_to_work(*(stack.local_noun_pointer(0))) {
Expand Down Expand Up @@ -700,7 +700,7 @@ fn match_hint_pre_nock(
println!("raw slog: {} {}", pri, tank);
}
}
tas!(b"spot") => {
tas!(b"hand") | tas!(b"hunk") | tas!(b"lose") | tas!(b"mean") | tas!(b"spot") => {
let trace = Cell::new(stack, tag.as_noun(), res).as_noun();
stack.trace_push(trace);
}
Expand Down Expand Up @@ -728,7 +728,7 @@ fn match_hint_post_nock(
let mut key = Cell::new(stack, subject, formula).as_noun();
*cache = cache.insert(stack, &mut key, res);
}
tas!(b"spot") => {
tas!(b"hand") | tas!(b"hunk") | tas!(b"lose") | tas!(b"mean") | tas!(b"spot") => {
// In the future, we should only do this if 11 is not in tail position
stack.trace_pop();
}
Expand Down

0 comments on commit c163400

Please sign in to comment.