avm2: Avoid a function call on every push()
This commit is contained in:
parent
9a1a21ef3a
commit
a1797a351d
|
@ -503,8 +503,11 @@ impl<'gc> Avm2<'gc> {
|
|||
}
|
||||
let mut value = value.into();
|
||||
if let Value::Object(o) = value {
|
||||
if let Some(prim) = o.as_primitive() {
|
||||
value = *prim;
|
||||
// this is hot, so let's avoid a non-inlined call here
|
||||
if let Object::PrimitiveObject(_) = o {
|
||||
if let Some(prim) = o.as_primitive() {
|
||||
value = *prim;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue