feat: add sameas and multiple-result attributes - #2597
Draft
zhouguangyuan0718 wants to merge 1 commit into
Draft
zhouguangyuan0718 wants to merge 1 commit into
zhouguangyuan0718 wants to merge 1 commit into
Conversation
This was referenced Sep 14, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
LLGo baseline benchmarks
Program measurements
Core language and compiler benchmarks
Timer runtime benchmarks
Compared with |
LLGo WebAssembly build benchmarks
WebAssembly output sizes
LLGo WebAssembly build measurements
Compared with |
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.
Adds
sameas(name)and explicitly selected multiple-result guarantees from #2590. A caller can reuse the evaluated input value for a promised result while retaining the call, its side effects and its possible panic.Result facts are materialized before ABI conversion. Pointer and integer facts apply to whole source results, including padded tuples and indirect returns. Relations use evaluated input snapshots; normal-edge assumptions for
invokeleave unwinding intact. The backend keeps temporary plans in Go memory and consumes them once per module. Runtime checked-pointer and C-string-copy helpers declare their result identity in source.Depends on #2596, the preceding large-aggregate projection fix. The review diff contains only result relations and multiple-result support.
Validation on macOS arm64, Go 1.27.0 / LLVM 22.1.8:
cl,ssa,internal/funcattrsandinternal/abisuites passed; C ABI unit tests passed excluding external toolchain build/corpus tests.runtime/internal/testpassed with default GC andnogc, including nil panic, defer/recover, input snapshot mutation and 80 KB results.Review order: #2572 (function properties) → #2595 (parameter and single-result values) → #2596 (large-aggregate projections) → #2597 (result relations and multiple results) → #2598 (pointer access and aliasing). Each PR targets its predecessor so its diff contains only that step.