Skip to content

refactor: add ResourceBorrowTransfer and callee_defines_resource flag#33

Merged
avrabe merged 2 commits intomainfrom
refactor/resource-borrow-transfer
Mar 16, 2026
Merged

refactor: add ResourceBorrowTransfer and callee_defines_resource flag#33
avrabe merged 2 commits intomainfrom
refactor/resource-borrow-transfer

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Mar 16, 2026

Summary

Structural groundwork for 3-component resource borrow forwarding:

  • ResourceBorrowTransfer struct replaces (u32, u32) tuple, adding optional new_func for handle transfer chains
  • ResolvedResourceOp.callee_defines_resource flag distinguishes 2-component (pass rep) from 3-component (needs handle transfer)
  • AdapterRequirements.caller_resource_params for caller-side resource map resolution
  • emit_resource_borrow_phase0 helper consolidates Phase 0 code across all 5 adapter generators

resource_floats remains fuse-only — the 3-component borrow forwarding needs caller-component-aware [resource-rep] lookup.

Test plan

  • 73 tests pass, 0 failures
  • Pre-commit hooks pass

🤖 Generated with Claude Code

avrabe and others added 2 commits March 16, 2026 17:36
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>
@avrabe avrabe merged commit eb2e37b into main Mar 16, 2026
3 checks passed
@avrabe avrabe deleted the refactor/resource-borrow-transfer branch March 16, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant