Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm2: Optimizer improvements #15105

Merged
11 changes: 11 additions & 0 deletions core/src/avm2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ mod multiname;
mod namespace;
pub mod object;
mod op;
mod optimize;
mod parameters;
pub mod property;
mod property_map;
Expand Down Expand Up @@ -622,6 +623,16 @@ impl<'gc> Avm2<'gc> {
self.stack.push(value);
}

/// Push a value onto the operand stack.
/// This is like `push`, but does not handle `PrimitiveObject`
/// and does not check for stack overflows.
#[inline(always)]
fn push_raw(&mut self, value: impl Into<Value<'gc>>) {
let value = value.into();
avm_debug!(self, "Stack push {}: {value:?}", self.stack.len());
self.stack.push(value);
}

/// Retrieve the top-most value on the operand stack.
#[allow(clippy::let_and_return)]
#[inline(always)]
Expand Down
Loading