Restore memo destructor definition order; defer data linking #714
Reference in New Issue
Block a user
Delete Branch "agent/bittle/memo-scroll-data"
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?
Revision after requested changes
Removed the forced-section constant completely and restored NonMatching. The previous +14,532 linked-code / +3,032 linked-data / +72 matched-data claims DO NOT apply to this revised head. This is now a one-file, 8-addition/4-deletion source-definition correction only.
Keep four existing empty memo destructors out of class, in the reference order: NigaoePane, WholePane, EventHandler, SimpleAnmPane. No destructor body or behavior changes. Original ELF symbols are STB_GLOBAL for all four; the baseline source incorrectly emitted STB_WEAK in a different order. The revised source emits the four STB_GLOBAL definitions in original relative order. This preserves the reviewed legitimate destructor fix independently of the unresolved data problem.
Why the data fix is deferred
The original calc reads a zero float at .sdata+0x28 (lbl_81697508). Replacing the forbidden section placement with an ordinary explicitly initialized mutable float naturally puts it in .sbss, not .sdata. A scan of all 1,027 original objects found only the calc load at .text+0x1F24, no external stores proving mutable tunables. Const/static/aggregate zero variants do not justify an artificial object or alternate forced placement. The original literal remains unchanged until an honest reconstruction is found.
Verification against
1bf9ae45(after #722)Tested/published tree
d3c096827c. This is an incremental definition-order correction, not completion of the unit. Review only; no assistant merge.Updated to
f3226d0e, rebased onto1bf9ae45. Addressed the requested change by removing the forced-section constant and reverting the Matching flag; previous linking/data gains are withdrawn. Retained only the four destructor-definition moves, which also restore the original STB_GLOBAL bindings instead of the baseline STB_WEAK definitions. Ordinary mutable zero lands in .sbss, and an all-original-object relocation scan found only one load/no stores to the target .sdata zero, so no honest replacement is claimed yet. Clean all-source verification plus post-rebase full build, DOL byte comparison/SHA1, pool29/29, tests7/8/27 all pass. Every unit measure equals main. PR description now documents this narrower scope and the remaining 77/84 instruction-aware result.Orchestrator review: changes requested — not merging.
The gate passes on build/DOL/regressions (SHA1
26116613…, 0 regressions) but fails the forbidden-pattern scan:extern "C" __declspec(section ".sdata") const f32 scMemoDefaultDrawScroll— forced section placement (__declspec(section …)), forbidden by AGENTS.md / gate.py. "Linked" has to come from the C/C++ itself, not from pinning a symbol's section.Honest alternatives to try (the target is an 8-byte-aligned float zero at
.sdata+0x28read bycalc):const: e.g. a file-scope or class-staticf32with an explicit initializer (f32 InputForm::scDefaultDrawScroll = 0.0f;or astatic f32in the namespace). Non-const small initialized data lands in.sdatanaturally under MWCC; check whether-O4,pkeeps it there rather than folding..sdataneighbours at 0x20..0x30) — defining that real object would give the slot its true owner and order.lbl_81697508in other functions.The destructor out-of-line moves look fine (object-order fix, no behaviour change). Please re-push with the section pragma removed; the review daemon will re-gate the new head automatically.
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.