mirror of
https://github.com/urbit/ares.git
synced 2024-11-22 15:08:54 +03:00
Revert "wip: test interpret_with_guard
"
This reverts commit fcb1ba51da
.
This commit is contained in:
parent
8bcbf6adca
commit
77ec530c7c
@ -1,5 +1,5 @@
|
|||||||
use crate::interpreter::{interpret, Context, Error, Mote, Result};
|
use crate::interpreter::{Error, Mote, Result};
|
||||||
use crate::noun::{Noun, D};
|
use crate::noun::D;
|
||||||
use ares_guard::*;
|
use ares_guard::*;
|
||||||
use assert_no_alloc::permit_alloc;
|
use assert_no_alloc::permit_alloc;
|
||||||
use std::convert::TryFrom;
|
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
@ -1,5 +1,4 @@
|
|||||||
use crate::hamt::Hamt;
|
use crate::hamt::Hamt;
|
||||||
use crate::guard::interpret_with_guard;
|
|
||||||
use crate::interpreter;
|
use crate::interpreter;
|
||||||
use crate::interpreter::{inc, interpret, Error, Mote};
|
use crate::interpreter::{inc, interpret, Error, Mote};
|
||||||
use crate::jets::cold::Cold;
|
use crate::jets::cold::Cold;
|
||||||
@ -144,7 +143,7 @@ impl Context {
|
|||||||
snapshot: Option<Snapshot>,
|
snapshot: Option<Snapshot>,
|
||||||
constant_hot_state: &[HotEntry],
|
constant_hot_state: &[HotEntry],
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let mut stack = NockStack::new(128 << 10 << 10, 0);
|
let mut stack = NockStack::new(2048 << 10 << 10, 0);
|
||||||
let newt = Newt::new();
|
let newt = Newt::new();
|
||||||
let cache = Hamt::<Noun>::new(&mut stack);
|
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 fol = T(stack, &[D(8), pul, D(9), D(2), D(10), sam, D(0), D(2)]);
|
||||||
let sub = T(stack, &[arvo, ovo]);
|
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 {
|
fn peek(context: &mut Context, ovo: Noun) -> Noun {
|
||||||
|
Loading…
Reference in New Issue
Block a user