Repository navigation
Support recursive raw pointer types - #1609
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A raw address embedded its complete target class, so classifying
`Node { next: *Node }` needed Node's layout while building it and cycled.
Name raw targets by an interned handle instead: a source recipe keyed by
the normalized target type, resolved only on dereference, or an exact
class for addresses taken from places, synthetic code, and specialized
boundaries. Scalar targets are classified directly.
Resolve source recipes in a context derived from the type (its first ADT
scope, empty assumptions) so one type has one handle in every function.
Compare differently spelled targets structurally where an operation needs
typed agreement, and retarget raw arguments accepted by borrow and
reference-shape boundaries to the boundary's exact pointee so both
spellings select the same runtime instance. Verification and naming stop
at deferred targets.
Summaries replayed non-writing changes to caller cells as physical stores, which broke the frame property for read-only callees and multiplied conditional sources across calls until the solver stalled on recursive raw-pointer structures. - Retire moved capabilities with `BorrowState::move_out` instead of an empty clobbering write, and propagate callee consumption to callers. - Publish input poststates only for written, fresh, or byte-overlapped cells. - Collapse arbitrary seeds and replacements inside arbitrary memory into one finite `OpaqueMemory` family per referent contract. - Normalize existential witnesses in reachability and expand each region once per reachable traversal.
sbillig
force-pushed
the
recursive-raw-pointees
branch
from
September 27, 2026 22:26
7645481 to
24eb688
Compare
cburgdorf
added a commit
that referenced
this pull request
Sep 30, 2026
Several user-facing changes merged after 26.3 were missing release notes entries: - Bugfixes: event ABI `anonymous` flag (#1562), string literal escapes (#1563), effect provider identity (#1564), shared calls on non-Copy fields (#1581), recursive raw pointer types (#1609). - Performance: `DynArray::get` for static elements (#1559), constant string ABI encoding (#1560), compile-time caching (#1617, #1619, #1621). - Native backend features: workspaces, native tests and `std::io` (#1565), process arguments and CPU timing (#1566), `ByteBuffer` (#1580).
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.
Recursive raw-pointer types such as
struct Node { value: u256, next: *Node }pass type checking but could not be lowered: computing the runtime class recursed through the pointee (runtime_stored_classquery cycle). The borrow checker also did not terminate on ordinary programs over such types: repeated calls to joining or looping helpers, matchingOption<*T>or enum payloads, and passing recursive enum payloads. Both reproduce on1b296f748.Runtime (967268e)
RawAddrholds an internedRawPointeeIdinstead of a resolved class.RawPointeeKey::Stored(TyId)is resolved lazily byresolve_stored_raw_pointee(canonical scope: first ADT scope in the type, empty assumptions). Scalar pointees areExact.runtime/relation.rs).BorrowLikeandExactShape(Ref(C))toRawAddr(S, Exact(C)).explicit_raw_boundariesandpointer_first_classSonatina snapshots change only in symbol hash suffixes and function order.Borrow checker (7645481)
BorrowState::move_outand do not clobber overlapping cells. Callee consumption propagates to callers throughResolvedAvailability::consumed.ExternalOrigin::OpaqueMemoryfamily per referent contract. Allocation and input cells keep their identities.