Repository navigation
TSLANG_ISSUES: four found writing native_ts_graphics' graphics pipeline (14-17) - #566
Merged
Merged
Conversation
…ne (14-17) 14: a literal-union ternary as an integer tuple field fails in codegen (llvm.sext of a union, no location). 15: u64 * an integer literal is computed in 32 bits. 16: u64 % goes through f64, and u64 / has no integer division. 17: storing through Ref<u8> indexing is rejected. Each with the repro run on pre-alpha100 and the workaround used. 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.
Four tslang issues found while adding NVRHI's graphics pipeline to native_ts_graphics (ASDAlexander77/native_ts_graphics#61), each with a complete repro run on pre-alpha100 and the workaround the project uses:
x ? 1 : 0) as an integer tuple field fails in codegen:llvm.sextof!ts.union<literal 0, literal 1>, reported at<unknown>:0. #560 fixed the same union for binary operators.u64 * <integer literal>is computed in 32 bits:2^32 * 2gives 0, andd *= 256wraps. With au64constant it is right. This cut every debug name native_ts_graphics passed NVRHI to 4 characters.u64 %goes through f64, so it is wrong above 2^53 (w % 256gives 108 for 109).u64 /always gives a float, so there is no exact integer division.Ref<u8>indexing (bytes[i] = x) is rejected with "saving to constant object"; reading works. This one is a question: is there a supported way?🤖 Generated with Claude Code