Skip to content

Drop the golden_line -mm=own workarounds tslang pre-alpha147 fixes - #361

Merged
ASDAlexander77 merged 1 commit into
mainfrom
golden-line-drop-own-workarounds
Dec 5, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
golden-line-drop-own-workarounds

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

tslang pre-alpha147 (TypeScriptCompiler#1131, #1132) compiles the code #341 and #353 had to work around for -mm=own, so golden_line goes back to the original's shape in these spots:

  • cab: cabLimb's radiusAt / frame / ring / cap are closures again, as in cab.js (the CAB_limb* module functions are gone).
  • saloon: the chair back and wing faces are closures given straight to surface() again (SAL_backFace / SAL_wingFace are gone).
  • traingeo: callback results are held in locals again (warp, orient, surfaceRaw, the flat shape, moulding, the bucket's style channels); geoTake and geoTakePoints are gone.
  • world: refillBag assigns the new bag (this.bag = order) instead of refilling it in place.

Kept: the world's slot tables. They aren't a compiler bug: -mm=own rejects a Map holding class instances ("'Map' cannot hold 'Anchor' ... use 'Shared'"), so going back to Maps would mean a different design.

Checked locally (Windows, Debug, tslang pre-alpha147): golden_line builds under gc and under own (--own-fallback=error), and its ctest passes 6/6 on each (default, cab, seat; dx12 and vk). I didn't run the other examples or compare frames byte for byte; the edits only move code back into closures and locals.

Separate issue found: building only --target golden_line doesn't run copy_media, so bin/media/golden_line is missing and the test segfaults on null texture bindings. A full build (as CI does) is fine.

🤖 Generated with Claude Code

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>
@ASDAlexander77
ASDAlexander77 merged commit 1612f6a into main Dec 5, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the golden-line-drop-own-workarounds branch December 5, 2026 20:29
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