fix(SR-32): inner resource handle fixup for borrow<T> in list elements#37
Merged
fix(SR-32): inner resource handle fixup for borrow<T> in list elements#37
Conversation
When list elements contain borrow<T> (e.g., list<record { thing: borrow<T> }>),
the adapter now converts each handle to its representation after bulk-copying
the list data to callee memory. This mirrors emit_inner_pointer_fixup but
for resource handles: load handle, call [resource-rep], store rep back.
Changes:
- parser.rs: element_inner_resources() recursively finds resource handles
inside record/tuple types
- resolver.rs: CopyLayout::Elements gains inner_resources field
- adapter/mod.rs: inner_resource_fixups on AdapterOptions
- adapter/fact.rs: inner resource fixup loops in generate_memory_copy_adapter
and generate_retptr_adapter
Promotes resource_borrow_in_record to runtime test.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Converts borrow handles inside list elements after bulk copy. Promotes resource_borrow_in_record to runtime. 40/45 fixtures passing.