feat(jit): with
This commit is contained in:
@@ -463,7 +463,12 @@ impl JITCompile for Let {
|
||||
|
||||
impl JITCompile for With {
|
||||
fn compile(&self, ctx: &mut JITContext, engine: ir::Value, env: ir::Value) -> StackSlot {
|
||||
todo!()
|
||||
let namespace = self.namespace.compile(ctx, engine, env);
|
||||
ctx.enter_with(env, namespace);
|
||||
let ret = self.expr.compile(ctx, engine, env);
|
||||
ctx.exit_with(env);
|
||||
ctx.free_slot(namespace);
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,7 +524,7 @@ impl JITCompile for Str {
|
||||
|
||||
impl JITCompile for Var {
|
||||
fn compile(&self, ctx: &mut JITContext, engine: ir::Value, env: ir::Value) -> StackSlot {
|
||||
todo!()
|
||||
ctx.lookup(env, &self.sym)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user