Skip to content

Drop the workarounds for compiler bugs that are now fixed - #109

Merged
ASDAlexander77 merged 1 commit into
mainfrom
lib-compiler-cleanups
Nov 20, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
lib-compiler-cleanups

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Depends on ASDAlexander77/TypeScriptCompiler#946. Merge that first: without it, ConvertingTypedArray's private static methods are reported as "not accessable".

Summary

  • with: renamed from _with on TypedArray, Uint8ClampedArray/Float16Array, Array<T> and Temporal's PlainDate, PlainTime and PlainDateTime, to match JavaScript. A plain T[] keeps _with, because with can't name a function in TypeScript either. Programs that call _with on these classes have to change.
  • Native f16: Float16Array, DataView's getFloat16/setFloat16 and Math.f16round now convert through an f16, since the runtime has the compiler-rt helpers on every target (#943, compiler side). The hand-written binary16 encoder and decoder go, and so does the value * -1 that kept -0.
  • __ConvertedElement: its helpers are private static generic methods of ConvertingTypedArray again. A generic class's static generic methods can be called now.
  • Array<T>.splice: takes the removed elements from the built-in splice, which now returns them, instead of reversing them to the end and popping them off.

Tests

  • Native, full suite, compiled: passes under gc, none, rc and own. The skips follow tests.ps1's first-line markers, and the stdin tests are given their input.
  • JIT: the affected tests (typed arrays, DataView, Math, Temporal, Array<T>) pass under all four models.
  • wasm32 and wasm64: the same affected tests pass under none, rc and own, with freshly built wasm libraries.

🤖 Generated with Claude Code

- `with` on TypedArray, the clamped and Float16 arrays, Array<T> and
  Temporal's PlainDate, PlainTime and PlainDateTime, as JavaScript names
  it, where it was `_with`. A T[] keeps `_with`: `with` cannot name a
  function.
- Float16Array, DataView's Float16 accessors and Math.f16round convert
  through a native f16: the runtime now has the conversion helpers on
  every target. The software binary16 encoder goes, and with it the
  `value * -1` that kept -0.
- ConvertingTypedArray's element conversions are private static methods
  of it again, not the `__ConvertedElement` namespace.
- Array<T>.splice takes the removed elements from the built-in splice,
  which now gives them back.

Needs ASDAlexander77/TypeScriptCompiler#946 (a generic class's private
statics through the class name).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit f172ff6 into main Nov 20, 2026
2 of 10 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