optimize: avoid generating drop glue for StepResult

This commit is contained in:
2026-04-19 19:17:43 +08:00
parent e527d31450
commit 800249cb1e
6 changed files with 69 additions and 50 deletions
+2 -2
View File
@@ -59,10 +59,10 @@ impl<'gc> crate::Vm<'gc> {
unreachable!()
};
self.with_env = with_env;
return StepResult::Done(Err(Error::eval_error(format!(
return self.finish_err(Error::eval_error(format!(
"undefined variable '{}'",
Symbol::from(ctx.resolve_string(name))
))));
)));
};
self.push_stack(env);
if let Some(step) = self.try_force_resolved(0, reader.inst_start_pc(), mc) {