Revert "wip: test interpret_with_guard"

This reverts commit fcb1ba51da.
This commit is contained in:
Matthew LeVan 2024-02-15 14:32:37 -05:00
parent 8bcbf6adca
commit 77ec530c7c
3 changed files with 504 additions and 499 deletions

View File

@ -1,5 +1,5 @@
use crate::interpreter::{interpret, Context, Error, Mote, Result};
use crate::noun::{Noun, D};
use crate::interpreter::{Error, Mote, Result};
use crate::noun::D;
use ares_guard::*;
use assert_no_alloc::permit_alloc;
use std::convert::TryFrom;
@ -98,10 +98,3 @@ pub fn call_with_guard<F: FnMut() -> Result>(
}
}
}
pub fn interpret_with_guard(context: &mut Context, eve: Noun, lyf: Noun) -> Result {
let stack_pp = context.stack.get_stack_pointer_pointer() as *const *const u64;
let alloc_pp = context.stack.get_alloc_pointer_pointer() as *const *const u64;
call_with_guard(stack_pp, alloc_pp, &mut || interpret(context, eve, lyf))
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
use crate::hamt::Hamt;
use crate::guard::interpret_with_guard;
use crate::interpreter;
use crate::interpreter::{inc, interpret, Error, Mote};
use crate::jets::cold::Cold;
@ -144,7 +143,7 @@ impl Context {
snapshot: Option<Snapshot>,
constant_hot_state: &[HotEntry],
) -> Self {
let mut stack = NockStack::new(128 << 10 << 10, 0);
let mut stack = NockStack::new(2048 << 10 << 10, 0);
let newt = Newt::new();
let cache = Hamt::<Noun>::new(&mut stack);
@ -403,7 +402,7 @@ fn slam(context: &mut Context, axis: u64, ovo: Noun) -> Result<Noun, Error> {
let fol = T(stack, &[D(8), pul, D(9), D(2), D(10), sam, D(0), D(2)]);
let sub = T(stack, &[arvo, ovo]);
interpret_with_guard(&mut context.nock_context, sub, fol)
interpret(&mut context.nock_context, sub, fol)
}
fn peek(context: &mut Context, ovo: Noun) -> Noun {