Skip to content

Reuse reachability lowering output - #178

Merged
ctate merged 7 commits into
mainfrom
ctate/lowering-hotspots
Aug 20, 2026
Merged

Reuse reachability lowering output#178
ctate merged 7 commits into
mainfrom
ctate/lowering-hotspots

Conversation

@ctate

@ctate ctate commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator
  • Retain reachable IR and assemble the emitted module without lowering bodies a second time
  • Preserve reached-only artifact filtering, coverage remainder behavior, and add lowering phase timing

- Retain reachable IR and assemble the emitted module without lowering bodies a second time
- Preserve reached-only artifact filtering, coverage remainder behavior, and add lowering phase timing
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scriptc Ready Ready Preview Aug 20, 2026 6:44pm

@vercel vercel Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Additional Suggestion:

Phase-4 drainInstances drains instantiationQueue (function instances) before genericClassInstances (class instances), reversing the historical run() fixpoint sub-order and producing an observable record field-order (Object.keys/JSON/inspect) divergence for structurally-equal record shapes first seen during phase 4.

Fix on Vercel

AkisArou added a commit to AkisArou/scriptc that referenced this pull request Aug 20, 2026
Six upstream commits, four of them library-compilation caching, landing in
the same files this fork restructured for library PLANNING a day earlier.
Merged now rather than later because ctate's PR vercel-labs#178 restructures
`lowerer.ts`, where this fork holds +261/-9 including the chained
native-call fence — waiting would mean resolving a compounded conflict set
instead of two smaller ones.

Sixteen files conflicted, thirty-one hunks, resolved as follows.

IR VERSION (nine files). Upstream inlines `irVersion: 6`; this fork hoisted
it to a constant now at 42. Ours throughout — an inlined 6 would make a
module claim an IR shape it does not have. Upstream's new
`early-cache.test.ts` was updated the same way.

IMPORT LISTS (five files). Unioned per module, computed rather than
hand-merged. Upstream renamed `library/int-infer.ts` to `ir/number-facts.ts`,
which collapsed two of this fork's import paths onto one module and produced
a duplicate; the subset was dropped.

INTERFACE ADDITIONS. `CEmitOptions` and the LLVM emitter's options both grew
a field on each side; unioned. Upstream's constructor parameter property is
strictly more capable than the plain parameter it replaced, so theirs.

FFI CALLBACK EMISSION. Upstream's line calls `emitFfiCallbackDefs`, which
commit 3894a46 deleted with the outbound FFI subsystem. Ours stands and
their `hasNoInlineRecordClone` joins it. This is the first concrete cost of
that deletion, and it is worth naming: it is a fork-only simplification
upstream would be right to refuse, and every future merge will meet it again.

LIBRARY COMPILATION — DEFERRED, NOT RESOLVED. Upstream's four caching
commits restructure `compileLibrary` in the same region as this fork's
prepare/plan extraction, and their `libraryLocalizeSymbols` and
`libraryNativeFeatures` are this fork's `libraryNativeBuildPlan` split in
two for the same reason. Their new MODULES — `early-cache.ts`,
`library-identity.ts`, `input-tracker.ts`, `semantic-source.ts` — merged
cleanly and are present. Only the 309-line wiring conflicts, and hand-merging
it produced a hybrid with two `compileLibrary` definitions that nobody could
vouch for. So `index.ts` keeps this fork's version, their modules sit inert,
and adopting their caching is a named follow-up where the two sets of helpers
converge into one. An unwired module changes no behavior; a hybrid would.

Verified by every gate that is one: compiler typechecks; the named fork gates
pass 122/0 (manifest, export, native-ir, owner-gateway, callback token/table/
handle); library-mode, library-multi and the new plan suite pass 84/0
including upstream's own early-cache tests; the parent gate is 267 pass with
its one failure unchanged from before the merge and owned by an in-flight
lane elsewhere. The fork's full corpus is not a gate and is being categorized
separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRREdy8Eo9c6u6fUPaqu5p
@ctate
ctate merged commit 6310dfb into main Aug 20, 2026
14 checks passed
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