optimize: remove {StepResult,TailResult}::ForceThunk

This commit is contained in:
2026-04-20 15:10:55 +08:00
parent 98b07f00e4
commit 520bb7d75e
12 changed files with 132 additions and 188 deletions
+4 -4
View File
@@ -10,8 +10,8 @@ impl<'gc> crate::Vm<'gc> {
ctx: &mut impl crate::VmContext,
reader: &mut BytecodeReader<'_>,
mc: &Mutation<'gc>,
) -> StepResult<'gc> {
if let Some(step) = self.try_force_resolved(0, reader.inst_start_pc(), mc) {
) -> StepResult {
if let Some(step) = self.try_force(0, reader, mc) {
return step;
}
if self.call_depth > 10000 {
@@ -50,7 +50,7 @@ impl<'gc> crate::Vm<'gc> {
ctx: &mut impl crate::VmContext,
reader: &mut BytecodeReader<'_>,
mc: &Mutation<'gc>,
) -> StepResult<'gc> {
) -> StepResult {
self.handle_return(reader, ctx, mc)
}
@@ -59,7 +59,7 @@ impl<'gc> crate::Vm<'gc> {
reader: &mut BytecodeReader<'_>,
ctx: &C,
mc: &Mutation<'gc>,
) -> StepResult<'gc> {
) -> StepResult {
let ret_inst_pc = reader.pc() - 1;
let Some(CallFrame {
pc: ret_pc,