Repository navigation
A literal starting with U+FEFF keeps it; an old runtime is named (TSLANG 34-36) - #790
Merged
Merged
Conversation
…ANG 34-36)
34: LLVM's UTF-16 to UTF-8 conversion takes a leading U+FEFF for a byte order
mark and skips it (and byte-swaps a string starting with U+FFFE), so a string
literal starting with that character lost it. Literals are converted as they
are.
35 ("\\n" read as a line feed) does not reproduce; the new test covers it.
36: a runtime library older than #784 failed every --emit=dll with a bare
LNK2001 for __tslang_heap_shared. tslang checks TypeScriptAsyncRuntime.lib
first and says the runtime is older than the compiler. -v is an alias for
--verbose, so the linker's "use -v" hint works.
Also records the open -mm=own items 31-33 in TSLANG_ISSUES.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TSLANG 34: a string literal starting with U+FEFF lost it
LLVM's
convertUTF16ToUTF8Stringtreats a leading U+FEFF as a byte order mark and skips it. It would also byte-swap a whole string starting with U+FFFE.convertWideToUTF8(MLIRHelper.h) now callsConvertUTF16toUTF8directly on the units as they are, on Windows and Linux alike."\uFEFF".lengthis now 3, not 0.TSLANG 35:
"\\n"read as a line feedThis does not reproduce. On this build the filed repro prints
2 6 4 2 2 3and92 2, as expected. The new test covers these cases anyway.TSLANG 36: an older runtime gave a bare LNK2001 for
__tslang_heap_shared--emit=dllon Windows, tslang now checks thatTypeScriptAsyncRuntime.libcontains__tslang_heap_shared. If it doesn't, tslang says the runtime is older than the compiler and to point--tslang-lib-path(orTSLANG_LIB_PATH) at the runtime that came with it. I checked this against a runtime from 2026-10-31, and checked that the current runtime still links.-vis now an alias for--verbose, which is no longer hidden and prints the linker's command line. So the linker's "use -v to see invocation" hint now works.TSLANG_ISSUES.md: 34-36 are moved into the fixed summary, and the open
-mm=ownitems 31-33 are recorded.Tests
00string_literal_escapes.ts, in all four memory models, JIT and compiled. It fails on alpha119.--no-default-libdoesn't have. After rewriting it, the new tests and the ownership verifier pass. The binary changed only by a comment after the full run.00string*tests.🤖 Generated with Claude Code