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: Store locals on AVM stack instead of per-Activation RegisterSets #19248

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

Lord-McSweeney
Copy link
Collaborator

This speeds up getlocal/setlocal by about 10%

@Lord-McSweeney Lord-McSweeney added A-avm2 Area: AVM2 (ActionScript 3) T-perf Type: Performance Improvements labels Jan 17, 2025
@@ -214,23 +175,20 @@ impl<'a, 'gc> Activation<'a, 'gc> {
let (method, global_object, domain) = script.init();

let num_locals = match method {
Method::Native { .. } => 0,
Method::Native { .. } => 1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be sure, is this even reachable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The script initializer of the builtins script is a native method, so without this the builtin script fails to initialize

@Lord-McSweeney Lord-McSweeney enabled auto-merge (rebase) January 18, 2025 21:12
@Lord-McSweeney Lord-McSweeney merged commit 3c71ed2 into ruffle-rs:master Jan 18, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm2 Area: AVM2 (ActionScript 3) T-perf Type: Performance Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants