Skip to content

Merge train: #9626 #9630 #9632 (+ manifest drift fix, red on main) - #9638

Merged
proggeramlug merged 6 commits into
mainfrom
land-train94
Sep 3, 2026
Merged

Merge train: #9626 #9630 #9632 (+ manifest drift fix, red on main)#9638
proggeramlug merged 6 commits into
mainfrom
land-train94

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Lands #9626 (single-unit globals keep their own linkage so zero-init caches stay in __bss), #9630 (SWC-backed Script-vs-Module detection replacing the byte-level ESM scanner, +133/-235) and #9632 (Bun project Node-API addon paths).

Two fixes carried:

  • perry-codegen/src/module.rs crossed the 2000-line cap (fix(codegen): keep single-unit globals in their own linkage so zero-init caches stay in __bss (#9610) #9626 grew the linkage block by 165 lines); the 324-line linkage/symbol helper block moved to module/linkage.rs.
  • bun::zstdDecompress was declared has_receiver: true in API_MANIFEST but false in NATIVE_MODULE_TABLE — a typo in feat(bun): add CLI utility shim pack #9621 that had already reached main and was failing manifest_consistency. The table is authoritative (it is a namespace function, not a receiver method), so the manifest row now matches. This is the class CLAUDE.md warns about: crates/*/tests/*.rs integration suites only run per-PR when the diff names them, so it passed every gate on the way in.

Validation: run_lint_gates.sh all 62 gates pass; release build green; RUST_TEST_THREADS=1 perry-runtime green; perry-parser + perry-codegen 0 failing suites (manifest_consistency now 5/5).

Rebase-merge preserving authorship.

Ralph Küpper added 6 commits September 3, 2026 17:24
…nit caches stay in __bss

Splitting a module into codegen units promoted every generated global to
`linkonce_odr` so the linker could fold a global that more than one unit
defines. Most globals are defined by exactly one unit, and the promotion is
not free on Mach-O: `linkonce_odr` is weak-for-linker, and
`TargetLoweringObjectFileMachO::SelectSectionForGlobal` routes every
weak-for-linker global to the coalesced data section before it looks at
whether the initializer is zero. A `zeroinitializer` global that would have
gone to zerofill `__DATA,__bss` therefore lands in file-backed
`__DATA,__data` and its zeros are written into the binary.

Promote only the globals a link would actually see defined twice. ELF and
COFF are unaffected: their BSS classification ignores linkage, and the
non-Mach-O path already gives each global a single strong owner.

Fixes #9610

Claude-Session: https://claude.ai/code/session_019iAdropXK3d2gyuGexbKMv
…fest has_receiver now matches the dispatch table (#9621 typo, red on main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant