Skip to content

avm1: Migrate flash.geom.Point from Rust to ActionScript - #24736

Merged
relrelb merged 3 commits into
masterfrom
avm1_point
Oct 1, 2026
Merged

relrelb merged 3 commits into
masterfrom
avm1_point

Conversation

@relrelb

@relrelb relrelb commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Description

Make use of the playerglobal infrastructure introduced in #23730 to implement flash.geom.Point using pure ActionScript.

Testing

Existing tests now match closer Flash's behavior, and Gnash's Point-v8 test now passes cleanly.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@relrelb relrelb added A-avm1 Area: AVM1 (ActionScript 1 & 2) T-refactor Type: Refactor / Cleanup labels Sep 20, 2026
Comment thread core/src/avm1/globals/flash/geom/Point.as Outdated
Comment thread core/src/avm1/globals/flash/geom/Point.as Outdated
Comment thread core/src/avm1/globals/flash/geom/Point.as Outdated
Comment thread core/src/avm1/globals/globals.as
@moulins

moulins commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

As discussed on Discord, I'm not entirely convinced by the decoupling of case sensitivity and SWF version; I think it should split it in a separate PR so we can determine if it's the correct approach separately.
To keep Point (mostly) working, you could instead use [6, 8] instead of [6, 7] for the SWF versions in Avm1::run_stack_frame_for_globals (EDIT: and move the flash version-gating at the end of globals.as).

@relrelb
relrelb added this pull request to stack #24744 September 21, 2026 09:46
@relrelb relrelb added the T-compat Type: Compatibility with Flash Player label Sep 21, 2026
@relrelb
relrelb force-pushed the avm1_point branch 2 times, most recently from fe0a328 to 71b0529 Compare September 22, 2026 06:25
Comment thread tests/tests/swfs/avm1/point/test.as Outdated
Comment thread tests/tests/swfs/avm1/point/test.as
@relrelb
relrelb requested a review from kjarosh September 23, 2026 08:44
@kjarosh

kjarosh commented Sep 25, 2026

Copy link
Copy Markdown
Member

The AS code and tests LGTM, thank you! I haven't looked at the swf version stuff yet. It also looks like we could rearrange commits and squash some of them, the history is quite complicated.

@relrelb

relrelb commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

The AS code and tests LGTM, thank you! I haven't looked at the swf version stuff yet. It also looks like we could rearrange commits and squash some of them, the history is quite complicated.

Done. WDYT?

@kjarosh kjarosh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! Looks great!

@relrelb
relrelb merged commit 62b387f into master Oct 1, 2026
27 checks passed
@relrelb
relrelb deleted the avm1_point branch October 1, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm1 Area: AVM1 (ActionScript 1 & 2) T-compat Type: Compatibility with Flash Player T-refactor Type: Refactor / Cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants