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: Do not allocate for Namespace::any() #17771

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

moulins
Copy link
Contributor

@moulins moulins commented Sep 5, 2024

Namespace now holds a Option<Gc<_>> internally, with None representing the Any namespace.

This is closer to how avmplus represents namespaces internally (they use a NULL pointer for the Any case), and allows creating the Any namespace without a &Mutation<'gc>.

`Namespace` now holds a `Option<Gc<_>>` internally, with `None`
representing the Any namespace.
@torokati44 torokati44 changed the title [avm2] Do not allocate for Namespace::any() avm2: Do not allocate for Namespace::any() Sep 5, 2024
@torokati44
Copy link
Member

Let's not allow this to start bit-rotting.

@torokati44 torokati44 merged commit 5550443 into ruffle-rs:master Sep 5, 2024
16 of 17 checks passed
@moulins moulins deleted the any-namespace-is-none branch September 5, 2024 22:04
Comment on lines +373 to +376
&& class_trait
.name()
.namespace()
.exact_version_match(avm2.as3_namespace)
Copy link
Member

Choose a reason for hiding this comment

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

Oh, wasn't this condition negated...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants