Skip to content

Bump tslang to pre-alpha146 and drop the golden_line workarounds it fixes - #353

Merged
ASDAlexander77 merged 1 commit into
mainfrom
tslang-146-workarounds
Dec 5, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
tslang-146-workarounds

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

  • This PR moves CI's tslang pin from pre-alpha140 to pre-alpha146 (cmake/CMakeDetermineTSLANGCompiler.cmake).
  • It removes the golden_line workarounds for compiler issues that pre-alpha146 fixes:
    • Hashes: the hash constants are hex again, and the shifts use >>> / >>> 0 as rng.js and plume.js write them, in world, tender and plume. This removes the ushr/unsigned helpers (TSLANG 234).
    • Array resets: water empties one grid across cells, and textures and plume empty arrays through their locals (TSLANG 237, 244).
    • Treegen: emitTube reads const pts = tube.pts (TSLANG 239).
    • Station: SnCtx assigns name with the rest of the plan's fields (TSLANG 242).
    • Tender: coalLump warps its lump with a closure again, as tender.js does (TSLANG 238).
  • Some workarounds are kept because the real modules still fail under -mm=own --own-fallback=error, even where the small repro now passes:
    • world.ts's slot tables and bag refill (236);
    • the saloon's chair closures in a loop (238);
    • traingeo's geoTake (240);
    • the cab's limb closures;
    • the workarounds for 241, 243 and 245.
    • These are logged as entry 246 in TSLANG_ISSUES.md.

Verification

  • Builds: clean rebuilds of gc and own on pre-alpha146 build every example. Own builds with no fallback.
  • Tests: the full gc ctest passes 535/535, and the full own ctest passes 535/535.
  • Frames: the golden_line views (default, cab, seat, tunnel, trackside, viaduct, dusk interior) are byte-identical to main in gc, own and rc. A clean main on pre-alpha146 also renders the same as on pre-alpha145.
  • Geometry: the train dumps (geometry, engine, coach, coal lump, tender, cab, saloon) and the camera pose dumps are identical.

🤖 Generated with Claude Code

…ixes

pre-alpha146 fixes TSLANG 234-240 (and 242, 244 with them), so the golden_line
modules go back to the code the original writes:

- the rng.js / plume.js hashes in hex with >>> (no ushr/unsigned helpers)
- water empties one grid across cells; textures and plume empty their arrays
  through their locals
- treegen's emitTube reads `const pts = tube.pts`
- the station assigns its name with the rest of the plan
- the tender warps its coal lump with a closure, as tender.js does

Kept, because the real modules still fail under --own-fallback=error though
the small repros pass: world.ts's slot tables and bag refill, the saloon's
chair closures, traingeo's geoTake, the cab's limb closures (TSLANG 246).

Every example builds on gc and own; full ctest 535/535 on both; golden_line
frames and train dumps identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit ddd2379 into main Dec 5, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the tslang-146-workarounds branch December 5, 2026 11:00
ASDAlexander77 added a commit that referenced this pull request Dec 5, 2026
)

pre-alpha147 (TypeScriptCompiler#1131, #1132) compiles, under -mm=own --own-fallback=error,
the code #341 and #353 had to work around, so it goes back to the original's shape:

- cab: cabLimb's radiusAt / frame / ring / cap are closures again, as in cab.js
- saloon: the chair back and wing surfaces are closures given straight to surface()
- traingeo: callback results are held in locals again; geoTake and geoTakePoints are gone
- world: refillBag assigns the new bag to the field

Kept: the world's slot tables, since -mm=own does not let a Map hold class instances.

golden_line ctest 6/6 on gc and on own (dx12, vk).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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