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: Declare correct signature for builtin rust-side getters/setters #17494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Aaron1011
Copy link
Member

This only affects the handful of classes that we still implement entirely in Rust (with only an ActionScript stub when compiling playerglobals).

We now expose the proper signatures to describeType, and have more type information for future use in the optimizer.

@torokati44 torokati44 changed the title avm2: Declare correct signature for builtin rust-side getters/settesr avm2: Declare correct signature for builtin rust-side getters/setters Aug 13, 2024
@evilpie
Copy link
Collaborator

evilpie commented Sep 8, 2024

This should be even simpler after #17792 lands.

@evilpie evilpie added the waiting-on-author Waiting on the PR author to make the requested changes label Sep 9, 2024
@danielhjacobs danielhjacobs added A-avm2 Area: AVM2 (ActionScript 3) T-fix Type: Bug fix (in something that's supposed to work already) labels Sep 17, 2024
This only affects the handful of classes that we still implement
entirely in Rust (with only an ActionScript stub when compiling
playerglobals).

We now expose the proper signatures to `describeType`, and have
more type information for future use in the optimizer.
@Aaron1011 Aaron1011 removed the waiting-on-author Waiting on the PR author to make the requested changes label Sep 26, 2024
@@ -1155,24 +1156,39 @@ impl<'gc> Class<'gc> {
&'static str,
Option<NativeMethodImpl>,
Option<NativeMethodImpl>,
Option<Gc<'gc, Multiname<'gc>>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be simpler if this accepted Option<&' static str> instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the simplest thing here would be to use the CommonNamespaces fields in the getter/setter definitions.

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-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants