cli: add explicit built-in error values

Add the error_values feature and error.const through specification, AIR,
verification, interpretation and source lowering. Error values are Copy data
with no allocation, effects or authority. Keep enum.make semantics frozen.

Cover all registered tags, feature negotiation, payload/type errors and
authority rejection in AIR/source; verify canonical and hosted CLI behavior.
Record reference-bundle costs and the map preflight-validation prerequisite.
This commit is contained in:
dev committed 2026-10-07 08:09:49 +03:00
1 parent 89c63c306b
commit 1eaf968f4f
56 files changed
+823 -4

No files matched your search

+1
View File
@@ -39,6 +39,7 @@ Declaring `features [capabilities, effects, ownership]` grants no authority. It
| `channel_transfer` | reserved | — | `cancellation`, `capabilities`, `channels`, `effects`, `heap`, `ownership`, `resources`, `tasks` | endpoints inside channel elements or mutex contents; unscheduled |
| `channels` | published | 3 | `cancellation`, `capabilities`, `effects`, `heap`, `ownership`, `resources`, `tasks` | `sender<T>`, `receiver<T>`, `channel.*`, `select` (spec 04 §38–§39) |
| `effects` | published | 2 | — | flat effect checking of `effects [...]` for `call` and `intrinsic` (E3101, spec 05 §9) |
| `error_values` | published | 6 | `capabilities`, `effects`, `heap`, `ownership`, `resources` | pure construction of registered built-in errors with `error.const`; errors confer no authority (spec 05 §14) |
| `guard_transfer` | reserved | — | `cancellation`, `effects`, `ownership`, `sync`, `tasks` | `guard<T>` as parameter, return type or aggregate member; unscheduled |
| `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` | published | 4 | `capabilities`, `effects`, `heap`, `ownership`, `resources` | `island<T>`, `frozen<T>`, `iref<T>`, `island.*`, `frozen.*`, `iref.eq`, `IslandSafe`, `T0010` (spec 03 §22–§23) |
+1
View File
@@ -57,6 +57,7 @@ instruction = [ local { "," local } "=" ] operation ;
operation = "const." int_type int_lit
| "const.bool" ( "true" | "false" )
| "error.const" ( "alloc_error" | "cap_error" | "io_error" ) "." ident (* feature error_values; no payload *)
| "copy" local
| arith_op local "," local
| "assert" local