Repository navigation
Fix freestanding helper attributes, literal truthiness, and array returns - #922
Merged
LunaStev merged 1 commit intoOct 13, 2026
Merged
Conversation
Fix late-created helper attributes, untyped integer truthiness, and array value returns. Add native, HIR, and bounded Whale oracle regressions for wavefnd#912, wavefnd#913 and wavefnd#914. Signed-off-by: LunaStev <luna@lunastev.org>
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.
Summary
Fix three reproduced compiler defects:
if (4294967296)now takes the branch, consistently with an explicit bool cast; logical operands no longer borrow each other's arithmetic width.E9001.Motivation
Closes #912
Closes #913
Closes #914
The audit reproduced missing helper attributes in AMD64 disassembly, a silently false nonzero literal condition at O0/O2, and array returns that passed semantic checking but failed during LLVM lowering. Regression coverage includes those triggers and their compatibility boundaries.
Target and compatibility impact
LLVM remains the default and the existing
--whaleselection is unchanged. Preserve explicit integer narrowing and wrapping, ordered conversions, short-circuit evaluation, and ordinary array address/indexing behavior. No dependency, version, CLI or target-coverage changes.The Whale regression uses verified textual IR and the bounded upstream integer interpreter. It does not add native Whale execution or integers wider than the adapter's supported subset. Design items #918, #919 and #920 remain separate.
Validation
Passed with Rust 1.89.0 and LLVM 21.1.8:
LLVM_SYS_211_PREFIX=/usr/lib64/llvm21 cargo +1.89 test --locked --offline --jobs 2 --workspace --all-targets --target-dir /tmp/wave-alpha-nine-target LLVM_SYS_211_PREFIX=/usr/lib64/llvm21 cargo +1.89 clippy --locked --offline --jobs 2 --workspace --all-targets --target-dir /tmp/wave-alpha-nine-target -- -D warnings cargo +1.89 fmt --all -- --check git diff --checktest140.waveandtest141.waveran on Linux amd64 at O0/O2 and wasm64 at O2. They cover literal conditions/casts/logical-not, loop conditions, skipped invalid shifts, and local/parameter/literal/grouped/nested/empty array returns.Checklist
Signed-off-byline.std/.