feat: a lot
This commit is contained in:
@@ -19,13 +19,13 @@ pub use compile::JITCompile;
|
||||
use helpers::*;
|
||||
|
||||
pub trait JITContext: EvalContext + Sized {
|
||||
fn lookup_stack(&self, offset: usize) -> &Value<Self>;
|
||||
fn lookup_arg(&self, offset: usize) -> &Value<Self>;
|
||||
fn enter_with(&mut self, namespace: Rc<HashMap<String, Value<Self>>>);
|
||||
fn lookup_stack(&self, offset: usize) -> &Value;
|
||||
fn lookup_arg(&self, offset: usize) -> &Value;
|
||||
fn enter_with(&mut self, namespace: Rc<HashMap<String, Value>>);
|
||||
fn exit_with(&mut self);
|
||||
}
|
||||
|
||||
type F<Ctx: JITContext> = unsafe extern "C" fn(*const Ctx, *mut Value<Ctx>);
|
||||
type F<Ctx> = unsafe extern "C" fn(*const Ctx, *mut Value);
|
||||
|
||||
pub struct JITFunc<Ctx: JITContext> {
|
||||
func: F<Ctx>,
|
||||
|
||||
Reference in New Issue
Block a user