Skip to content

feat(compiler): deep-review orchestration — 12 OpenSpec changes - #242

Open
julia-script wants to merge 55 commits into
mainfrom
agent/compiler-review-unified
Open

feat(compiler): deep-review orchestration — 12 OpenSpec changes#242
julia-script wants to merge 55 commits into
mainfrom
agent/compiler-review-unified

Conversation

@julia-script

@julia-script julia-script commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Compiler Deep-Review — Unified Orchestration PR

Combines all 12 OpenSpec changes from the compiler deep-review orchestration into a single reviewable branch. Supersedes #230#241.


Wave A — Foundation

remove-compiler-dead-code (17 files, −300 lines)

Deletes nine zero-caller Analysis exports, dead serializers and guards (IntrinsicAvailability.encode, Type.isOutOfMemoryError, Type.intrinsicConformances/intrinsicallyConforms, OsRuntime.isSymbol, CallableFieldRealization narrowers, OpaqueRealization.publicOrigin), dead IR walkers (SuspensionMir.hasSuspension, Hir.hasUnavailable, Mir.suspensionControlEdges), ModuleTooling.make, DeclarationIndex.presentParameterNameEntries alias, FrontendTooling re-exports, and the eager SyntaxCorrespondence call from ProjectAnalysis. Drops the effect/Option import from Mir.ts.

extract-compiler-shared-helpers (7 new internal modules)

  • internal/ByteClass.ts — unified ASCII byte classifiers, routed through Lexer, LiteralForm, IntegerLiteral
  • internal/Align.ts — one alignUp, routed through Layout, Backend, WasmBackend, CoroutineFrame
  • internal/Graph.ts — parameterized Tarjan SCC, ModuleClosure routed through it
  • internal/Escape.ts — escape vocabulary, LiteralForm scalarCount extracted
  • ImportPath.spelling() — unified import-path rendering, routed through ModuleSummary, ImportPlan, ModuleClosure
  • FloatingPoint.canonicalNaN() — single canonical NaN constant, routed through Transcendental, fromNumber, squareRoot
  • Backend.suspensionPointKey — exported from Backend, WasmBackend duplicate deleted

Wave B — Semantic + Boundary

reconcile-compiler-duplicated-semantics

Exports Type.accessRank, adds Type.compareAccess and Type.requirementSatisfies. Routes TypeCompatibility, InterfaceWitnessCompatibility, and Type.ts internal sites through the shared helpers. Fixes the exact-only requirement access check in Type.ts (now uses Shared < Exclusive ordering). Creates internal/SetOf.ts with equal/union/intersection, routes Ownership and SuspensionOwnership set helpers through it. Adds Type.someSubterm (boolean fold over Type). Adds Ownership.inReleaseOrder (LIFO release-order helper), routes SuspensionOwnership through it. Fixes Token.describe('Invalid') wording.

harden-compiler-native-boundary

Replaces RangeError throw with BackendError yield in WasmBackend codegen. Removes the never-injected NativeLinker interface. Preserves error cause in BootstrapEvaluation HostWrite and OsCall catch blocks. Removes as SyntaxTree.Node casts from Elaboration.ts.


Wave C — Eight Splits

Each split establishes the module structure its proposal calls for:

Change New module or change
split-compiler-elaboration Cast removal, re-export structure
split-compiler-frontend Keyword table unification in Lexer.ts
split-compiler-type-system internal/TypeInference.ts
split-compiler-mid-end internal/CleanupPlan.ts
split-compiler-layout internal/CallingShape.ts
split-compiler-ir-evaluation internal/MirSuspension.ts
split-compiler-declaration-index internal/DeclarationFacts.ts
split-compiler-backends internal/BackendShared.ts

Verification

Gate Result
pnpm typecheck ✅ clean
pnpm exec biome check . ✅ 371 files, no fixes
pnpm test:parallel ✅ 214/214 files, 2018/2018 tests

Files changed

101 files, +1554/−536 lines

Two equal fingerprint samples could accept a writer paused after truncation. Require two confirmations and pass the loaded project snapshot directly to the watched build or check.
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