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();
|
let mut value = value.into();
|
||||||
if let Value::Object(o) = value {
|
if let Value::Object(o) = value {
|
||||||
if let Some(prim) = o.as_primitive() {
|
// this is hot, so let's avoid a non-inlined call here
|
||||||
value = *prim;
|
if let Object::PrimitiveObject(_) = o {
|
||||||
|
if let Some(prim) = o.as_primitive() {
|
||||||
|
value = *prim;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue