experiment: add layout of stable closures for graphcopy serialization#5470
Merged
crusso merged 3 commits intoclaudio/simple-stable-functions-eopfrom Sep 12, 2025
Conversation
crusso
added a commit
that referenced
this pull request
Sep 12, 2025
* eop stable functions WIP * implement stable closures and dispatch on funptr -1 * register stable_func upfront * compile FuncE (_, T.Stable, ...) by compiling implementation, updating stable_funcs and allocating proxy * working EOP, broken classical * harmonize classical and eop; (copying GC only for now - need barriers for other flavours) * hack in barriers - an abstraction would be nicer * missing test output * fix generational-gc barrier * repro for use before define * don't loop but trap with use-before-define error * simplify desugaring * rename helper * restrict test; add todo * fix skipping logic for stable functions (a nop) * handle stable func annotations properly in idl.rs * cleanup * add (failing, but accepted) test for stable func stabilization (needs new layout) * experiment: add layout of stable closures for graphcopy serialization (#5470) * copy stable_variant.rs to stable_closure.rs * WIP * implemenet graph stabilization for stable closures
crusso
added a commit
that referenced
this pull request
Sep 12, 2025
* desugaring complete (but with needless indirection * simplest test * basic upgrade test (carashing) * revert change; add test * working? * add global storing stable function table; deserialize by lookup * add uprade-set test; modify desugaring to register stubs early, to be used by deserialization * formatting * optimize by removing redundant option type (the function call is its own indirection) * remove debug prints * extened bi_match and Type.combine * hack type argument inference just enough to support our uses of dependent bounds * rewrite test to use inference * experiment: simpler stable functions, eop edition (WIP) (#5413) * eop stable functions WIP * implement stable closures and dispatch on funptr -1 * register stable_func upfront * compile FuncE (_, T.Stable, ...) by compiling implementation, updating stable_funcs and allocating proxy * working EOP, broken classical * harmonize classical and eop; (copying GC only for now - need barriers for other flavours) * hack in barriers - an abstraction would be nicer * missing test output * fix generational-gc barrier * repro for use before define * don't loop but trap with use-before-define error * simplify desugaring * rename helper * restrict test; add todo * fix skipping logic for stable functions (a nop) * handle stable func annotations properly in idl.rs * cleanup * add (failing, but accepted) test for stable func stabilization (needs new layout) * experiment: add layout of stable closures for graphcopy serialization (#5470) * copy stable_variant.rs to stable_closure.rs * WIP * implemenet graph stabilization for stable closures
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.
Builds on #5413
Add stable_closure serialization for subset of closures that are stable (funid = -1).
Implementation adapted from #5451