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:
1 parent
d4d641ad84
commit
b8d4ab4d4c
8 files changed
+154
-7
No files matched your search
@@ -36,11 +36,11 @@ Declaring `features [capabilities, effects, ownership]` grants no authority. It
|
||||
| `borrow_joins` | reserved | — | `ownership` | borrow-typed block parameters (spec 08 §11.6); unscheduled |
|
||||
| `channels` | reserved | 3 | `ownership` | bounded and rendezvous channels with ownership transfer |
|
||||
| `effects` | published | 2 | — | flat effect checking of `effects [...]` for `call` and `intrinsic` (E3101, spec 05 §9) |
|
||||
| `heap` | reserved | 2 | `capabilities`, `effects`, `ownership` | `Own<T>`, `own.alloc`, `own.free`, move-only values |
|
||||
| `islands` | reserved | 4 | `capabilities`, `effects`, `ownership`, `regions` | `Island<T>`, `iref<T>`, transfer, freeze, `Frozen<T>` |
|
||||
| `heap` | published | 2 | `capabilities`, `effects`, `ownership`, `resources` | `own<T>`, `own_array<T>`, `own.*`, built-in `alloc_error`, `mem.alloc` budgets and `budget` narrowing (spec 03 §18–§19) |
|
||||
| `islands` | reserved | 4 | `capabilities`, `effects`, `heap`, `ownership`, `regions`, `resources` | `Island<T>`, `iref<T>`, transfer, freeze, `Frozen<T>` |
|
||||
| `linear_aggregates` | reserved | — | `capabilities`, `effects`, `ownership`, `resources` | resource types as struct fields, enum payloads and array elements; unscheduled |
|
||||
| `ownership` | published | 1 | — | frame storage `local<T>`, second-class borrows `ref<T>`/`mut<T>`, `from` returns, initialization (spec 07 §8.8, spec 07a, spec 08 §11, §13) |
|
||||
| `regions` | reserved | 2 | `capabilities`, `effects`, `ownership` | `Region`, static generations, region allocation, reset and destroy |
|
||||
| `regions` | published | 2 | `capabilities`, `effects`, `heap`, `ownership`, `resources` | `region`, `region.*`, static generations (spec 03 §20) |
|
||||
| `resource_joins` | reserved | — | `capabilities`, `effects`, `ownership`, `resources` | joins whose incoming edges carry different resource states (spec 06 §6.3); unscheduled |
|
||||
| `resources` | published | 2 | `capabilities`, `effects`, `ownership` | linear resources `file<read>`, `file<write>`, `file<append>`, `listener`, `stream`; built-in `io_error`; I/O intrinsics (spec 06 §6–§7, `reference/intrinsics.md`) |
|
||||
| `sync` | reserved | 3 | `ownership` | `Mutex<T>`, `RwLock<T>`, linear guards |
|
||||
|
||||
@@ -9,7 +9,7 @@ Normative registry of capability kinds for AIR format 0 (spec 05 §10). A kind n
|
||||
| `fs.write` | `fs.write` | absolute path prefix | `prefix` |
|
||||
| `io.read` | `io.read` | none | — |
|
||||
| `io.write` | `io.write` | none | — |
|
||||
| `mem.alloc` | `mem.alloc` | byte budget | `budget` (RFC 0008) |
|
||||
| `mem.alloc` | `mem.alloc` | byte budget of live allocations; mandatory in the `deterministic` profile | `budget` |
|
||||
| `mem.map` | `mem.map` | none | — |
|
||||
| `net.connect` | `net.connect` | none | — |
|
||||
| `net.listen` | `net.listen` | none | — |
|
||||
@@ -26,6 +26,7 @@ Narrowing forms marked with an RFC are registered when that RFC is accepted; unt
|
||||
| Enum | Variants |
|
||||
|---|---|
|
||||
| `cap_error` | `invalid_restriction`, `not_subset`, `unsupported_restriction` |
|
||||
| `alloc_error` | `budget_exceeded`, `out_of_memory` |
|
||||
| `io_error` | `not_found`, `permission_denied`, `already_exists`, `invalid_input`, `no_space`, `broken_pipe`, `connection_refused`, `connection_reset`, `address_in_use`, `address_unavailable`, `timed_out`, `other` |
|
||||
|
||||
Variant sets of published built-in enums are frozen (spec 07 §8.7).
|
||||
@@ -35,6 +36,7 @@ Variant sets of published built-in enums are frozen (spec 07 §8.7).
|
||||
| Kind | Form | Argument | `ok` | `err` (`cap_error`) |
|
||||
|---|---|---|---|---|
|
||||
| `fs.read`, `fs.write` | `prefix` | `path: slice<u8>`, absolute, no empty/`.`/`..` components | same kind scoped to `path` | `invalid_restriction` if malformed; `not_subset` if not inside the current scope |
|
||||
| `mem.alloc` | `budget` | `n: usize` | child authority with limit `n`, charges propagate to every ancestor; nothing reserved | `not_subset` if `n` exceeds the parent's limit |
|
||||
|
||||
## Instantiation
|
||||
|
||||
|
||||
Reference in new issue
Block a user