optimize: remove {StepResult,TailResult}::ForceThunk
This commit is contained in:
@@ -2,14 +2,14 @@ use crate::{BytecodeReader, Mutation, StepResult, Value};
|
||||
|
||||
impl<'gc> crate::Vm<'gc> {
|
||||
#[inline(always)]
|
||||
pub(crate) fn op_load_local(&mut self, reader: &mut BytecodeReader<'_>) -> StepResult<'gc> {
|
||||
pub(crate) fn op_load_local(&mut self, reader: &mut BytecodeReader<'_>) -> StepResult {
|
||||
let idx = reader.read_u32() as usize;
|
||||
self.push_stack(self.env.borrow().locals[idx]);
|
||||
StepResult::Continue
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub(crate) fn op_load_outer(&mut self, reader: &mut BytecodeReader<'_>) -> StepResult<'gc> {
|
||||
pub(crate) fn op_load_outer(&mut self, reader: &mut BytecodeReader<'_>) -> StepResult {
|
||||
let layer = reader.read_u8();
|
||||
let idx = reader.read_u32() as usize;
|
||||
let mut cur = self.env;
|
||||
@@ -27,7 +27,7 @@ impl<'gc> crate::Vm<'gc> {
|
||||
&mut self,
|
||||
reader: &mut BytecodeReader<'_>,
|
||||
mc: &Mutation<'gc>,
|
||||
) -> StepResult<'gc> {
|
||||
) -> StepResult {
|
||||
let idx = reader.read_u32() as usize;
|
||||
let val = self.pop_stack();
|
||||
self.env.borrow_mut(mc).locals[idx] = val;
|
||||
@@ -39,7 +39,7 @@ impl<'gc> crate::Vm<'gc> {
|
||||
&mut self,
|
||||
reader: &mut BytecodeReader<'_>,
|
||||
mc: &Mutation<'gc>,
|
||||
) -> StepResult<'gc> {
|
||||
) -> StepResult {
|
||||
let count = reader.read_u32() as usize;
|
||||
self.env
|
||||
.borrow_mut(mc)
|
||||
|
||||
Reference in New Issue
Block a user