Repository navigation
Preserve effect provider identity across repeated calls - #1564
Merged
Merged
Conversation
sbillig
marked this pull request as ready for review
September 22, 2026 07:06
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. |
sbillig
force-pushed
the
fevm-pr-provider-identity
branch
from
September 22, 2026 23:12
d883c21 to
3bb573d
Compare
sbillig
force-pushed
the
fevm-native-base
branch
from
September 22, 2026 23:12
30cc450 to
bdfed75
Compare
sbillig
force-pushed
the
fevm-pr-provider-identity
branch
from
September 23, 2026 04:39
3bb573d to
9944786
Compare
micahscopes
added a commit
that referenced
this pull request
Sep 23, 2026
Const functions could not use effects at all: a `uses` clause on a `const fn` was an error, a call to any function with effects was an error, and every `with` expression in a `const fn` was rejected. A trait provider is an ordinary value, so an immutable one can be evaluated at compile time like any other argument. Allow a `const fn` to declare immutable trait effects and to supply them with `with`. During evaluation a call passes each provider as a value into the callee's effect slot, matched by the effect's binding index rather than by its position among ordinary arguments. A `with` provider that lowering captured as a place (#1564) is read from that place. The checker still rejects mutable effects, type-keyed (storage) effects, and extern functions with effects. A call whose const arguments are still symbolic normally falls back to a symbolic value. An effectful call does not take that fallback, because the value would lose its provider inputs. The `with`-in-const-fn diagnostic (8-0056) is removed, and the two remaining const-effect messages now say what is supported.
micahscopes
added a commit
that referenced
this pull request
Sep 25, 2026
Const functions could not use effects at all: a `uses` clause on a `const fn` was an error, a call to any function with effects was an error, and every `with` expression in a `const fn` was rejected. A trait provider is an ordinary value, so an immutable one can be evaluated at compile time like any other argument. Allow a `const fn` to declare immutable trait effects and to supply them with `with`. During evaluation a call passes each provider as a value into the callee's effect slot, matched by the effect's binding index rather than by its position among ordinary arguments. A `with` provider that lowering captured as a place (#1564) is read from that place. The checker still rejects mutable effects, type-keyed (storage) effects, and extern functions with effects. Deferral needs no special case. Since #1556, a call whose input is still generic blocks the whole attempt, which is discarded and replayed after specialization; the replay recomputes the providers from the caller's body. Term extraction already declines calls with effect arguments, so a provider never enters a retained term. A test checks that an effectful call blocks while generic and evaluates with its provider once specialized, like a pure call. Effect slots follow the same rules as ordinary argument slots: a request that supplies no providers for an effectful function is unsupported (`NotConstEvaluable`), and a slot count or index mismatch is an invalid operation, like the existing argument arity check. The `with`-in-const-fn diagnostic (8-0056) is removed, and the two remaining const-effect messages now say what is supported.
micahscopes
added a commit
that referenced
this pull request
Sep 28, 2026
Const functions could not use effects at all: a `uses` clause on a `const fn` was an error, a call to any function with effects was an error, and every `with` expression in a `const fn` was rejected. A trait provider is an ordinary value, so an immutable one can be evaluated at compile time like any other argument. Allow a `const fn` to declare immutable trait effects and to supply them with `with`. During evaluation a call passes each provider as a value into the callee's effect slot, matched by the effect's binding index rather than by its position among ordinary arguments. A `with` provider that lowering captured as a place (#1564) is read from that place. The checker still rejects mutable effects, type-keyed (storage) effects, and extern functions with effects. Deferral needs no special case. Since #1556, a call whose input is still generic blocks the whole attempt, which is discarded and replayed after specialization; the replay recomputes the providers from the caller's body. Term extraction already declines calls with effect arguments, so a provider never enters a retained term. A test checks that an effectful call blocks while generic and evaluates with its provider once specialized, like a pure call. Effect slots follow the same rules as ordinary argument slots: a request that supplies no providers for an effectful function is unsupported (`NotConstEvaluable`), and a slot count or index mismatch is an invalid operation, like the existing argument arity check. The `with`-in-const-fn diagnostic (8-0056) is removed, and the two remaining const-effect messages now say what is supported.
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.
Repeated calls through a temporary trait-effect provider can falsely move the provider or update separate copies. Capture each provider and its projections once per
withentry, then pass the same place to every effect call. Preserve actual aggregate layouts at effect boundaries and keep read-only temporaries eligible for constant storage.This changes shared semantic and runtime lowering while preserving move, alias, and escape checks. Native execution integration follows in the runtime PR.