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

+9
View File
@@ -22,6 +22,15 @@ Notation: `T` is the type suffix of the opcode; `I` ranges over integer types; `
## Values
### `error.const B.variant` (feature `error_values`)
- Static operands: built-in error family `B` and its registered payload-free variant; no SSA operands.
- Result: one Copy value of type `B`.
- Ownership/borrow/memory/concurrency transitions: none; effects and capabilities required: none; traps: none.
- Verifier transfer: define one available Copy value. Unknown family/variant: `E0004`; undeclared feature: `E0006`; incompatible result use: `E1001`. Payload syntax: `E0001`.
- Interpreter: bind the built-in family/tag deterministically, using normal fuel; no program allocation or authority acquisition.
- Complete contract and source syntax: spec 05 §14. `enum.make` is unchanged.
### `const.T lit`
- Operands: an integer literal (`T` ∈ `I`) or `true`/`false` (`T` = `bool`).