Skip to content

feat: add explicit region materialization - #712

Merged
sanohiro merged 6 commits into
mainfrom
agent/pkg-db-region-materialization
Aug 6, 2026
Merged

feat: add explicit region materialization#712
sanohiro merged 6 commits into
mainfrom
agent/pkg-db-region-materialization

Conversation

@sanohiro

@sanohiro sanohiro commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • add named arena capabilities and explicit clone_in(region) materialization
  • add region-backed array_builder<T> support for recursively RegionPlain values across whole-program and per-unit compilation
  • preserve concrete aggregate element types, caller region provenance, and borrow-mut builder ownership across HIR, MIR, interfaces, LLVM lowering, and runtime storage
  • extend checked-HIR and canonical interface validation for the new capability and builder forms

Why this capability is one PR

The producer and consumer form one strict ownership/ABI chain: region capabilities, materialization, aggregate builder descriptors, interface serialization, LLVM layout, and runtime allocation are not independently useful dormant seams. Keeping them together avoids duplicated cross-stage proofs and tests while leaving one mergeable end-to-end capability.

Review fixes

The bounded full-diff review found four issues, all closed in f5cbd414:

  • include named arenas in every MoveCheck transparent-block path
  • reject clone_in lengths above the target isize::MAX
  • keep the 64-byte array-builder stack storage as an ABI envelope on 32-bit targets
  • preserve zero-sized RegionPlain element counts in region builders

Validation

  • scripts/pre-pr.sh on final SHA f5cbd414 with the preceding review findings recorded as fixed
  • scripts/test-pr.sh
  • scripts/cargo.sh clippy --workspace --lib --bins --locked -- -D warnings
  • align_driver fb_region: 36 passed
  • align_sema unit suite: 207 passed
  • align_runtime region-array-builder owners: 4 passed

@sanohiro
sanohiro marked this pull request as ready for review August 6, 2026 10:41
@sanohiro
sanohiro merged commit 37a65cb into main Aug 6, 2026
5 checks passed
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