Step -> ControlFlow (use ?)
This commit is contained in:
@@ -11,9 +11,7 @@ impl<'gc> crate::Vm<'gc> {
|
||||
reader: &mut BytecodeReader<'_>,
|
||||
mc: &Mutation<'gc>,
|
||||
) -> Step {
|
||||
if let Some(step) = self.try_force(0, reader, mc) {
|
||||
return step;
|
||||
}
|
||||
self.try_force(0, reader, mc)?;
|
||||
if self.call_depth > 10000 {
|
||||
return self.finish_err(Error::eval_error("stack overflow; max-call-depth exceeded"));
|
||||
}
|
||||
@@ -41,7 +39,7 @@ impl<'gc> crate::Vm<'gc> {
|
||||
} else {
|
||||
todo!("call other types: {func:?}")
|
||||
}
|
||||
Step::Continue
|
||||
Step::Continue(())
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
@@ -109,7 +107,7 @@ impl<'gc> crate::Vm<'gc> {
|
||||
reader.set_pc(inner_ip);
|
||||
self.env = inner_env;
|
||||
self.with_env = inner_with_env;
|
||||
return Step::Continue;
|
||||
return Step::Continue(());
|
||||
}
|
||||
ThunkState::Evaluated(val) => {
|
||||
*outer_thunk.borrow_mut(mc) = ThunkState::Evaluated(val);
|
||||
@@ -132,6 +130,6 @@ impl<'gc> crate::Vm<'gc> {
|
||||
}
|
||||
self.env = env;
|
||||
self.with_env = with_env;
|
||||
Step::Continue
|
||||
Step::Continue(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user