WIP: test(lift): the frame-store and dead-flag text passes get a check of their own #1571
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1571
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:test/lift-text-passes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: test · Risk: low · Tested on: Windows 11, Ryzen 9 3900X · Needs: none
TL;DR
Two of the rewrites the translator makes to the C it writes had no check: the one that stops marking stores to the stack through the frame pointer, and the one that drops flag updates nothing reads. This adds a game-free check of both. Each fails it when broken by hand.
Breakdown
frame_stores,fp_is_frameanddrop_flag_stores(a64-kit's emit) were checked only by the game-dependent checks thattests/run_all.pyskips.tests/test_lift_text_passes.py, a check on texts in suyu's own shapes and throughemit_functionon made-up functions.310e7c9d;frame_storesmade a no-op,drop_flag_storesdropping every flag write, andfp_is_framealways true each fail it.Why
The wiki's CPU rework plan asks that every pass over the emitted C has a game-free check before the passes are restructured (milestone C4). Of the passes in the kit's emit and Longshot's layer, these two had none naming them: the mark grouping, the giant split, fast float, the entry splices, the polls, local registers and the game patches already have theirs.
What changed
tests/test_lift_text_passes.py(new):fp_is_frame(no write of x29, the frame setup and its restore are the frame; any other write, or taking x29's address, is not);frame_stores(stores through x29, direct, through_band pairs, take the_spform; stores through other registers and loads are left alone); throughemit_function(a frame pointer's stores lose their marks, an ordinary x29's keep them,A64_MARK_FRAME=1keeps them all);drop_flag_stores(dead flags' writes go, live ones and flag comparisons stay).Measurements
Verdict: nothing to measure: a check only.
Flags and settings
None.
Testing
Tested: on Windows 11 with the Builder's Python 3.14: passes on
310e7c9d; each of the three passes broken by hand fails it (exit status 1, its message), and passes again restored.Not tested: Linux (pure Python, no compiler).
Must be tested: None.
Risks
What could break: nothing in the game.
Turning it off: revert the commit.
Compatibility: nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main. On310e7c9d.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). This check passes; the full suite not run yet.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.