Skip to content

avm1: Dynamically resolve builtin classes (2/N: Function, BitmapFilterss, display objects) - #24500

Merged
moulins merged 4 commits into
ruffle-rs:masterfrom
moulins:avm1-dyn-global-access-2
Aug 21, 2026
Merged

moulins merged 4 commits into
ruffle-rs:masterfrom
moulins:avm1-dyn-global-access-2

Conversation

@moulins

@moulins moulins commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Follow up to #24327.

Description

Resolve more built-ins dynamically. This covers:

  • the Function class;
  • all BitmapFilter subclasses;
  • all display objects (MovieClip, Button, TextField, Video).

Testing

Already covered by the existing avm1/globals_monkeypatch test.

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.

@moulins
moulins force-pushed the avm1-dyn-global-access-2 branch from 79c6ab4 to 478d4b0 Compare August 20, 2026 12:43
@moulins moulins added A-avm1 Area: AVM1 (ActionScript 1 & 2) waiting-on-review Waiting on review from a Ruffle team member T-compat Type: Compatibility with Flash Player labels Aug 20, 2026
Comment thread core/src/display_object/avm1_button.rs
@moulins
moulins force-pushed the avm1-dyn-global-access-2 branch from 478d4b0 to c61bdc3 Compare August 21, 2026 15:18
@moulins moulins removed the waiting-on-review Waiting on review from a Ruffle team member label Aug 21, 2026
...instead of using `SystemPrototypes`.

This progresses some Gnash tests.
...instead of using `SystemPrototypes`.

This progresses some Gnash tests.
...instead of using `SystemPrototypes`.
@moulins
moulins force-pushed the avm1-dyn-global-access-2 branch from c61bdc3 to e935ba5 Compare August 21, 2026 21:53
@moulins
moulins merged commit 0b4c47b into ruffle-rs:master Aug 21, 2026
26 of 28 checks passed
@moulins
moulins deleted the avm1-dyn-global-access-2 branch August 21, 2026 22:18
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Aug 30, 2026
-----------------------------------------------------------------------------------------------------
batocera-controlcenter.mk ce2d44093cbbea4ac1de7be85e4284a09e7df2b3 # Version: Commits on Aug 21, 2026
-----------------------------------------------------------------------------------------------------
RGCubeXX screen optimization (new medium layout for 720x720),

--------------------------------------------------------------------------------------------------------
batocera-emulationstation.mk 58dfd18972a1c4e95ab5405fa98f37b4cc4772ee # Version: Commits on Aug 21, 2026
--------------------------------------------------------------------------------------------------------
Merge pull request #2195 from Mikhailzrick/thread-count-optimization
thread-optimization,

------------------------------------------------------------------------------------------------
batocera-es-piboy.mk 58dfd18972a1c4e95ab5405fa98f37b4cc4772ee # Version: Commits on Aug 21, 2026
------------------------------------------------------------------------------------------------
Merge pull request #2195 from Mikhailzrick/thread-count-optimization
thread-optimization,

-----------------------------------------------------------------------------------
cemu.mk 5ead58008dd984f614e2cb38bd9cb69bd77fd1bb # Version: Commits on Jul 25, 2026
-----------------------------------------------------------------------------------
cli: add launch setting to open debugger,

------------------------------------------------------------------------------------------
duckstation.mk ad2a8a637c3289d3bfbf58c27828dd06bc42f590 # Version: Commits on Aug 22, 2026
------------------------------------------------------------------------------------------
System: Ensure achievements game is identified before loading state
Fixes state getting lost when resuming.,

-----------------------------------------------------------------------------------
eden.mk df05d3de23233d91297665c1caef63d699d334a3 # Version: Commits on Aug 22, 2026
-----------------------------------------------------------------------------------
[android, ui] lsfg: make "target frame rate" show/hide "frame multiplier" (#4274)

--------------------------------------------------------------------------------------
flycast.mk 7fcd6976fa338183c1b0b4a094146ba1d4e0d767 # Version: Commits on Aug 21, 2026
--------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

-------------------------------------------------------------------------------------
hatari.mk dd9a2ef10f66f59fe14084ccd2716c6c4965b935 # Version: Commits on Aug 21, 2026
-------------------------------------------------------------------------------------
Fix Clang build for counted_by attribute
Clang requires array count field to be declared before array field(s).,

----------------------------------------------------
pcsx2.mk v2.7.524 # Version: Commits on Aug 21, 2026
----------------------------------------------------
- [translations: Syncing Crowdin translations](PCSX2/pcsx2#14864)
,

-------------------------------------------------------------------------------------
ppsspp.mk c09e6bddaace3a9f6dfeb48f52a9eef9ae221751 # Version: Commits on Aug 21, 2026
-------------------------------------------------------------------------------------
Merge pull request #22128 from kotcrab/struct-viewer-fixes
Fix struct viewer after memory access cleanup,

------------------------------------------------------------------------------------
rpcs3.mk b97f4bd8da001396e62b5990b6563c929ec4aaa5 # Version: Commits on Aug 21, 2026
------------------------------------------------------------------------------------
rsx: Implement flat shading semantics,

-----------------------------------------------------------------------------------------
xenia-edge.mk 2a45b2310f80f140425754681b14a98769d6c97f # Version: Commits on Aug 21, 2026
-----------------------------------------------------------------------------------------
Merge remote-tracking branch 'upstream/canary_experimental' into edge,

---------------------------------------------------------------
ruffle.mk nightly-2026-08-22 # Version: Commits on Aug 22, 2026
---------------------------------------------------------------
## What's Changed
* core: Improve embedded font lookup by @kjarosh in ruffle-rs/ruffle#24503
* video: Reduce allocations/copies when decoding frames by @moulins in ruffle-rs/ruffle#24135
* avm2: Include attribute and element name in XML parser error 1104 by @evilpie in ruffle-rs/ruffle#24352
* chore: Resolve clippy beta lints by @torokati44 in ruffle-rs/ruffle#24502
* avm2: Refactor DisplayObjectContainer.stopAllMovieClips implementation by @Lord-McSweeney in ruffle-rs/ruffle#24506
* debug_ui: Add a font inspector window by @kjarosh in ruffle-rs/ruffle#24508
* desktop: Remove the wgpu-report-to-tracy-plot feature by @Dinnerbone in ruffle-rs/ruffle#24474
* avm1: Dynamically resolve builtin classes (2/N: `Function`, `BitmapFilters`s, display objects) by @moulins in ruffle-rs/ruffle#24500
**Full Changelog**: ruffle-rs/ruffle@nightly-2026-08-21...nightly-2026-08-22,

---------------------------------------------------------------------------------------
etlegacy.mk 40ed9349f29c3b4982f5fa63e1190c6921865070 # Version: Commits on Aug 21, 2026
---------------------------------------------------------------------------------------
misc: add g_xpSaveReset cvars to legacy config, refs #3520,

------------------------------------------------------------------------------------------
fallout2-ce.mk d810eed8dba766525b0fd390afed60daccbdf681 # Version: Commits on Aug 22, 2026
------------------------------------------------------------------------------------------
[low prio] Complete access to message lists (#503)
* Expose transient message lists.
Some message lists are only loaded while a given screen is active.  Sfall still lets scripts access them, though scripts need to be careful to only do so when the windows are active.,

-------------------------------------------------------------------------------------------
jazz2-native.mk ce8f7158ee03cfbfa6a6c469436afffa7227332d # Version: Commits on Aug 21, 2026
-------------------------------------------------------------------------------------------
Minor fixes including `WebRequest`,

------------------------------------------------------------------------------------------------
libretro-mame-src.mk 6161e17e99af820d8cd72da99f712abb6e623bd8 # Version: Commits on Aug 22, 2026
------------------------------------------------------------------------------------------------
Merge remote-tracking branch 'upstream/master',

--------------------------------------------------
labwc.mk 0.20.2 # Version: Commits on Aug 21, 2026
--------------------------------------------------
build: bump version to 0.20.2,

----------------------------------------------------------------------------------------
retroarch.mk a065e6b7d98b9876e604c73cd8b3fcf5b63eb22f # Version: Commits on Aug 22, 2026
----------------------------------------------------------------------------------------
(Android) Bound keycodes before writing android_key_state[]
android_input_poll_event_type_key() indexed the per-port key-state row
with the raw AKeyEvent_getKeyCode() value. Rows hold LAST_KEYCODE bits,
but the platform emits public keycodes above that (AKEYCODE_WAKEUP is
224, AKEYCODE_PROFILE_SWITCH 288) plus unbounded vendor codes, so any
such press wrote outside the row. On ANDROID_KEYBOARD_PORT - the last
row - that lands past the array and corrupts adjacent file-scope state,
including the function pointers the driver keeps there.
Reject bit indices at or above LAST_KEYCODE, matching the bound readers
already apply in android_joypad_button_state(). Nothing in that range is
bindable, so no reachable input is lost.,

----------------------------------------------------------------------------------------
doomretro.mk f1ab0412b1f9270677c5f8d9a0e9c1a150e1b18f # Version: Commits on Aug 22, 2026
----------------------------------------------------------------------------------------
Punctuate all player messages as necessary,

--------------------------------------------------------------------------------------
vkquake.mk 46e5e6dd5e47cf6a3b2bf5cadb91d744a2dced03 # Version: Commits on Aug 21, 2026
--------------------------------------------------------------------------------------
Fix id logo showing instead of loading screen when starting with +map,

--------------------------------------------------------------------------------------
yquake2.mk dbab49a9e95d1a990e25d714b2c1644d041a7c44 # Version: Commits on Aug 21, 2026
--------------------------------------------------------------------------------------
Merge remote-tracking branch 'yquake2/master',

--------------------------------------------------------------------------------------------------
libretro-beetle-psx.mk d97afa81e898fd27afff72ac8a0b4009dad774d8 # Version: Commits on Aug 22, 2026
--------------------------------------------------------------------------------------------------
rhi_tt: encapsulate the known_files bulk build in HdKeySet
read_texture_directory grew and indexed HdKeySet's array directly,
duplicating the growth policy the set already owns. Give the set
append_unsorted and finalize_sorted entry points for callers that produce
many keys at once, and let the directory scan use them.,

---------------------------------------------------------------------------------------------
libretro-fbneo.mk 9f9c674c6573dd3a74a3bdf432cdd773186e07e7 # Version: Commits on Aug 22, 2026
---------------------------------------------------------------------------------------------
(libretro) update files,

-----------------------------------------------------------------------------------------------
libretro-flycast.mk 7fcd6976fa338183c1b0b4a094146ba1d4e0d767 # Version: Commits on Aug 21, 2026
-----------------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

--------------------------------------------------------------------------------------------------
libretro-gearcoleco.mk b45c1107616d357fdce12f515570c87089731044 # Version: Commits on Aug 22, 2026
--------------------------------------------------------------------------------------------------
Improve rewind/run-ahead performance,

-------------------------------------------------------------------------------------------------
libretro-geargrafx.mk 0744e13558888fd839a2d4f1e1e4afd00e257532 # Version: Commits on Aug 22, 2026
-------------------------------------------------------------------------------------------------
Improve rewind/run-ahead performance,

--------------------------------------------------------------------------------------------------
libretro-gearsystem.mk 36bf0e1f51a96c36ccd3b61d67ebb9f116d754b2 # Version: Commits on Aug 22, 2026
--------------------------------------------------------------------------------------------------
Improve rewind/run-ahead performance,

----------------------------------------------------------------------------------------------------
libretro-parallel-n64.mk eb5ee66c2da75263226132935c7da71d51e0ac0d # Version: Commits on Aug 20, 2026
----------------------------------------------------------------------------------------------------
fix: map the Compatible depth compare option to dcCompatible
Config.h numbers the modes dcDisable = 0, dcFast = 1, dcCompatible = 2.
update_variables() assigned 1 for both \Compatible\ and \True\, so the
two settings did the same thing and the compatible path could not be
selected from the core options at all.,

---------------------------------------------------------------------------------------------
libretro-pd777.mk 4c8d1759cfbaad84f8ff0eae62b3e017daa6fbb1 # Version: Commits on Aug 21, 2026
---------------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

----------------------------------------------------------------------------------------------
libretro-ppsspp.mk c09e6bddaace3a9f6dfeb48f52a9eef9ae221751 # Version: Commits on Aug 21, 2026
----------------------------------------------------------------------------------------------
Merge pull request #22128 from kotcrab/struct-viewer-fixes
Fix struct viewer after memory access cleanup,

-------------------------------------------------------------------------------------------
libretro-ps2.mk f7e22b2da71ec45bf8524542dbb511cef1ef58ec # Version: Commits on Aug 22, 2026
-------------------------------------------------------------------------------------------
GS: drop the trivially-replaceable std:: names
The same mechanical sweep the core got, now that the hardware
renderers build here: std::uint8_t and friends to the plain
fixed-width names, std::memcpy/memset/strlen/strncmp/abs/toupper to
the C library names, std::size(arr) to C89_ARRAY_SIZE. 18 files
across GSState, GSDrawingContext, the HW renderers, and the DX11,
DX12, OpenGL, Vulkan and SW backends.
Nothing here is a judgement call; every one of these is the same
function or type under a different name.
Both build systems, both configurations: static Makefile clean with
the renderers on (16.7MB) and off (11.06MB); cmake configures and
builds common, pcsx2 and pcsx2_libretro clean.
Runtime, on the software build: Tekken from .cue, .cso and .chd at
1150 frame hashes each, all identical to baseline, audio hash
identical, gates 36/36. The renderer-side files are compile-verified
only, for the reason given in the previous commit -- the harness
declines SET_HW_RENDER, so the HW paths link but do not execute.,

---------------------------------------------------------------------------------------------
libretro-vba-m.mk ee1908e9a81d4fdc4680ac0284f7be6a1d3d8227 # Version: Commits on Aug 21, 2026
---------------------------------------------------------------------------------------------
build: fetch PowerShell for vcpkg builds on Unix
Set-Toolchain-vcpkg.cmake stops with \Powershell is required to use
vcpkg binaries\ when pwsh is absent, which it usually is on Linux and
macOS -- Fedora has no package for it at all. Fetch the upstream
portable build into the build tree instead, set POWERSHELL to it and
prepend its directory to $ENV{PATH}, so a vcpkg build needs nothing
installed beforehand.
The release to fetch comes from aka.ms/pwsh-buildinfo-stable rather
than the GitHub API, which is rate limited per IP and so unreliable
from CI, and is more current than tools/metadata.json. Both that
lookup and the download fail loudly rather than continuing without a
usable pwsh. There is no integrity check on the archive beyond HTTPS.
Upstream publishes .tar.gz for these platforms; the .zip archives are
Windows-only.
Only when vcpkg is actually in use: Set-Toolchain-vcpkg.cmake returns
early off Windows unless VCPKG_TARGET_TRIPLET is set, and every other
user of POWERSHELL is Windows- or MSVC-only, so an ordinary build is
not made to pull down an archive it would never run. The lookup sits
inside the download branch, so reconfiguring touches no network, but
$ENV{PATH} is set every time since it does not persist.
Drop the PowerShell prerequisite from the README along with it, and
tidy up the Android triplets and the MINGW32 toolchain wording there.
Assisted-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Rafael Kitover <rkitover@gmail.com>,
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants