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: Minor performance improvements #16150

Merged
merged 3 commits into from
May 9, 2024

Conversation

Lord-McSweeney
Copy link
Collaborator

@Lord-McSweeney Lord-McSweeney commented Apr 28, 2024

This PR has been stripped of most of the larger changes. The only notable change remaining is a fast path for setting index properties on arrays.

@SN902
Copy link

SN902 commented Apr 28, 2024

I found a regression
derpy FPS test.zip

thread 'main' panicked at core\src\avm2\property_map.rs:70:13: internal error: entered unreachable code: Lookup on lazy Multiname should never happen (Multiname { ns: Multiple([]), name: Some("rslProgressHandler"), param: None, flags: MultinameFlags(HAS_LAZY_NS | IS_QNAME) }) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace AVM2 stack trace: at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize() at mx.managers::SystemManager/initHandler()

@Lord-McSweeney Lord-McSweeney force-pushed the avm2-misc-optimizer branch 4 times, most recently from 5ca0acc to 998a9c8 Compare May 5, 2024 19:40
match name_value {
Value::Integer(name_int) if name_int >= 0 => {
if let Some(mut array) =
object.as_array_storage_mut(self.context.gc_context)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this rather be made similarly to op_get_property, with a "virtual" set_index_property? As written, this doesn't support vectors or bytearray.

@Lord-McSweeney Lord-McSweeney force-pushed the avm2-misc-optimizer branch 2 times, most recently from 497cae7 to c65263e Compare May 9, 2024 23:22
@Lord-McSweeney Lord-McSweeney changed the title avm2: Some more performance improvements avm2: Minor performance improvements May 9, 2024
@Lord-McSweeney Lord-McSweeney force-pushed the avm2-misc-optimizer branch from c65263e to 60fdc18 Compare May 9, 2024 23:28
@Lord-McSweeney Lord-McSweeney merged commit 8eaede1 into ruffle-rs:master May 9, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants