spec: accept RFC 0008 and integrate heap, regions and budgets

- spec 03 §18-§21: allocation authority and live-byte budgets, heap
  (own.new/array/take/free), regions (create/new/array/reset/destroy,
  static generations, E2104 on live references)
- spec 05 §11.2, 07 §8.9, 07a summary, 08 §11.2 region allocation paths
  and the ok-parameter exception to borrow_joins
- registries: alloc_error, mem.alloc budget form, mandatory deterministic
  budget; heap and regions published
This commit is contained in:
dev committed 2026-10-04 14:20:40 +03:00
1 parent d4d641ad84
commit b8d4ab4d4c
8 files changed
+154 -7

No files matched your search

+2 -2
View File
@@ -174,7 +174,7 @@ Normative rules for frame storage and second-class borrows. Decision record: RFC
Every borrow has a **root** (a `local` or a lent parameter), a **path** from the root (field names, a slice range, or an element), a **mode** (`ref`/`mut`) and a **parent** (none for borrows taken directly from a local or a parameter).
- Two paths overlap unless they diverge at different fields of the same struct, or they are the two results of one `slice.split` (and descendants of each).
- Two paths overlap unless they diverge at different fields of the same struct, at the two results of one `slice.split`, or at two different region allocations (spec 03 §20.2) (and descendants of each).
- Element borrows (`borrow.index`) and sub-slices of the same parent all overlap each other.
- Creating a borrow conflicts with every live borrow whose path overlaps when either is `mut` (`E2101`).
- A borrow with live children is **frozen**: it may still create further children that do not conflict, but it cannot be read, written or ended while a live child conflicts with that use (`E2101`, `E2102` for ending).
@@ -207,7 +207,7 @@ Each function's frame storage is the sum of the accounted sizes (§7.1) of its `
### 11.6 Borrow-typed block parameters
Borrow-typed block parameters are reserved for the feature `borrow_joins`. Without it they are rejected with `E0006` reason `feature_not_declared`. Using a feature gate, rather than a permanent type error, keeps the door open without breaking the format-0 freeze (spec 07 §8.7).
Borrow-typed block parameters are reserved for the feature `borrow_joins`, with one exception: the single parameter of the `ok` target of `region.new`/`region.array` (spec 03 §20), provided every edge into that block is such an `ok` edge. Without it they are rejected with `E0006` reason `feature_not_declared`. Using a feature gate, rather than a permanent type error, keeps the door open without breaking the format-0 freeze (spec 07 §8.7).
## 12. Bounds facts (feature `arrays`)