chore: fmt

This commit is contained in:
2025-05-11 13:49:44 +08:00
parent 05e82d4021
commit cfed44ebf4
3 changed files with 93 additions and 78 deletions

View File

@@ -86,8 +86,7 @@ impl<'vm> VM<'vm> {
opcode: OpCode,
stack: &'s mut Stack<'vm, CAP>,
env: &Rc<Env<'vm>>,
) -> Result<usize>
{
) -> Result<usize> {
match opcode {
OpCode::Illegal => panic!("illegal opcode"),
OpCode::Const { value } => stack.push(Value::Const(value))?,
@@ -170,8 +169,12 @@ impl<'vm> VM<'vm> {
}
OpCode::FinalizeRec => {
env.enter(stack.tos()?.clone().unwrap_attr_set().into_inner());
stack.tos_mut()?.as_mut().unwrap_attr_set().capture(env.clone());
},
stack
.tos_mut()?
.as_mut()
.unwrap_attr_set()
.capture(env.clone());
}
OpCode::PushStaticAttr { name } => {
let val = stack.pop();
stack.tos_mut()?.push_attr(Symbol::new(name.clone()), val);