spec: accept RFC 0007 and integrate I/O and linear resources
- spec 06 §6-§7: feature resources, consumption and verifier rules, io_error - spec 05 §11.1 fallible intrinsic form; spec 07 §8.7 frozen built-in enum variants, §8.9 resource types; spec 07a resources and run record fields; spec 11 §8 execution profiles, blocked outcome, result channel - reference/intrinsics.md: formal catalogue; capabilities.md: io_error and fs prefix narrowing - features: resources published, linear_aggregates reserved
This commit is contained in:
1 parent
c7bcea294e
commit
571cc6e362
9 files changed
+199
-83
No files matched your search
+4
-2
@@ -250,13 +250,15 @@ A change is permitted under `air 0` only if all of the following hold:
|
||||
3. the change adds instructions, types, diagnostic codes or trap codes; every added construct belongs to a feature registered in [`../reference/air-features.md`](../reference/air-features.md), and the feature's semantics are specified (spec 07a and the relevant spec files) before the feature is published and implemented;
|
||||
4. the canonical form (§8.5) of existing constructs is unchanged.
|
||||
|
||||
A published feature's semantics are immutable. Extending a feature with new semantics is not permitted; register a new feature instead.
|
||||
A published feature's semantics are immutable. In particular the variant set of a published built-in enum never changes, since a new variant would make existing exhaustive `enum.switch` instructions non-exhaustive. Extending a feature with new semantics is not permitted; register a new feature instead.
|
||||
|
||||
Any other change to format 0 — a different meaning, typing rule, trap behavior, diagnostic code or canonical spelling for an existing construct — requires a new format version (`air 1`) introduced by an RFC. An implementation that supports several format versions selects the semantics by the module's `air` line; it never mixes them.
|
||||
|
||||
### 8.9 Types of the features `effects` and `capabilities`
|
||||
|
||||
`cap<K>` (feature `capabilities`) is an opaque, copyable, authority-bearing value type; `K` is a registered capability kind ([`../reference/capabilities.md`](../reference/capabilities.md)). Built-in enums such as `cap_error` are spelled without `@`, have registered variants and are used with `enum.switch <builtin> %v, …` like declared enums. Rules: spec 05 §9–§12.
|
||||
`cap<K>` (feature `capabilities`) is an opaque, copyable, authority-bearing value type; `K` is a registered capability kind ([`../reference/capabilities.md`](../reference/capabilities.md)). Built-in enums such as `cap_error` and `io_error` are spelled without `@`, have registered variants and are used with `enum.switch <builtin> %v, …` like declared enums. Rules: spec 05 §9–§12.
|
||||
|
||||
Feature `resources`: `file<read>`, `file<write>`, `file<append>`, `listener`, `stream` are linear, authority-bearing resource types (spec 06 §6).
|
||||
|
||||
### 8.8 Types and syntax of the features `ownership` and `arrays`
|
||||
|
||||
|
||||
Reference in new issue
Block a user