feat: error handling
This commit is contained in:
@@ -32,13 +32,8 @@ use helpers::*;
|
||||
/// A trait that provides the execution context for JIT-compiled code.
|
||||
///
|
||||
/// This trait extends `EvalContext` with additional methods needed
|
||||
/// for JIT compilation, such as stack and argument lookups, and
|
||||
/// managing `with` expression scopes.
|
||||
/// for JIT compilation, such as managing `with` expression scopes directly.
|
||||
pub trait JITContext: EvalContext {
|
||||
/// Looks up a value in the evaluation stack by offset.
|
||||
fn lookup_stack(&self, offset: usize) -> &Value;
|
||||
/// Looks up a function argument by offset.
|
||||
fn lookup_arg(&self, offset: usize) -> &Value;
|
||||
/// Enters a `with` expression scope with the given namespace.
|
||||
fn enter_with(&mut self, namespace: Rc<HashMap<String, Value>>);
|
||||
/// Exits the current `with` expression scope.
|
||||
|
||||
Reference in New Issue
Block a user