refactor: add ResourceBorrowTransfer and callee_defines_resource flag#33
Merged
refactor: add ResourceBorrowTransfer and callee_defines_resource flag#33
Conversation
Structural groundwork for 3-component borrow forwarding: - ResourceBorrowTransfer struct replaces (u32, u32) tuple for resource_rep_calls, adding optional new_func for handle transfer - ResolvedResourceOp.callee_defines_resource flag distinguishes 2-component (callee defines resource, pass rep) from 3-component (callee imports resource, needs handle transfer) - AdapterRequirements.caller_resource_params for caller-side resource map - emit_resource_borrow_phase0 helper consolidates Phase 0 code resource_floats remains fuse-only: the 3-component borrow forwarding needs caller-component-aware [resource-rep] lookup to route handles through the correct resource table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lexity 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.
Summary
Structural groundwork for 3-component resource borrow forwarding:
ResourceBorrowTransferstruct replaces(u32, u32)tuple, adding optionalnew_funcfor handle transfer chainsResolvedResourceOp.callee_defines_resourceflag distinguishes 2-component (pass rep) from 3-component (needs handle transfer)AdapterRequirements.caller_resource_paramsfor caller-side resource map resolutionemit_resource_borrow_phase0helper consolidates Phase 0 code across all 5 adapter generatorsresource_floatsremains fuse-only — the 3-component borrow forwarding needs caller-component-aware[resource-rep]lookup.Test plan
🤖 Generated with Claude Code