refactor: split VmContext
This commit is contained in:
@@ -2,13 +2,15 @@ use fix_error::Error;
|
||||
use gc_arena::{Gc, Mutation, RefLock};
|
||||
|
||||
use crate::value::*;
|
||||
use crate::{BytecodeReader, CallFrame, Closure, Env, Step, ThunkState, VmContextExt};
|
||||
use crate::{
|
||||
BytecodeReader, CallFrame, Closure, Env, Step, ThunkState, VmRuntimeCtx, VmRuntimeCtxExt,
|
||||
};
|
||||
|
||||
impl<'gc> crate::Vm<'gc> {
|
||||
#[inline(always)]
|
||||
pub(crate) fn op_call(
|
||||
&mut self,
|
||||
ctx: &mut impl crate::VmContext,
|
||||
ctx: &mut impl VmRuntimeCtx,
|
||||
reader: &mut BytecodeReader<'_>,
|
||||
mc: &Mutation<'gc>,
|
||||
) -> Step {
|
||||
@@ -45,14 +47,14 @@ impl<'gc> crate::Vm<'gc> {
|
||||
#[inline(always)]
|
||||
pub(crate) fn op_return(
|
||||
&mut self,
|
||||
ctx: &mut impl crate::VmContext,
|
||||
ctx: &mut impl VmRuntimeCtx,
|
||||
reader: &mut BytecodeReader<'_>,
|
||||
mc: &Mutation<'gc>,
|
||||
) -> Step {
|
||||
self.handle_return(reader, ctx, mc)
|
||||
}
|
||||
|
||||
pub(crate) fn handle_return<C: crate::VmContext>(
|
||||
pub(crate) fn handle_return<C: VmRuntimeCtx>(
|
||||
&mut self,
|
||||
reader: &mut BytecodeReader<'_>,
|
||||
ctx: &C,
|
||||
|
||||
Reference in New Issue
Block a user