spec: accept RFC 0005 and integrate Phase 1 memory model (P1-1, P1-2)
- RFC 0005 Accepted (revision 2) - spec 07 §8.8 types and syntax; spec 07a contracts for features ownership and arrays; spec 08 §11-§14 borrows, facts, initialization, stage order; spec 03 frame storage, second-class borrows, static region generations - grammar: from-returns, multi-result, new types and opcodes - feature registry: ownership and arrays published; heap added and regions moved to Phase 2; borrow_joins reserved and unscheduled - codes E2105-E2108, T0008 - Q-009, Q-010 resolved; Phase 1 and Phase 2 plans updated; Own test moved to phase 2
This commit is contained in:
15 files changed
+269
-55
No files matched your search
+9
-6
@@ -26,8 +26,8 @@ Non-normative. The order in which the Zig reference implementation is built, and
|
||||
| Phase | File | Goal | Exit criterion | Blocking questions |
|
||||
|---|---|---|---|---|
|
||||
| P0 | [phase-0-semantic-skeleton.md](phase-0-semantic-skeleton.md) | AIR model, text parser, CFG/SSA/type verifier, interpreter | AIR `hello` and arithmetic tests execute identically across runs | resolved except Q-016 (floats reserved) |
|
||||
| P1 | [phase-1-ownership-and-memory.md](phase-1-ownership-and-memory.md) | `Own`, borrows, slices, init tracking, regions, bounds | file-copy core implemented; UAF/alias/OOB rejected | Q-009, Q-010 |
|
||||
| P2 | [phase-2-effects-capabilities-resources.md](phase-2-effects-capabilities-resources.md) | Effects, capabilities, linear resources, runtime intrinsics | safe file-copy and basic TCP echo | Q-011, Q-012, Q-018 |
|
||||
| P1 | [phase-1-ownership-and-memory.md](phase-1-ownership-and-memory.md) | Frame storage, second-class borrows, arrays/slices, init tracking, bounds (RFC 0005) | file-copy core on a local buffer; alias/dangling/escape/uninit/OOB rejected | resolved (Q-009, Q-010) |
|
||||
| P2 | [phase-2-effects-capabilities-resources.md](phase-2-effects-capabilities-resources.md) | Effects, capabilities, heap (`Own`), regions, linear resources, runtime intrinsics | safe file-copy and basic TCP echo | Q-011, Q-012, Q-018 |
|
||||
| P3 | [phase-3-structured-concurrency.md](phase-3-structured-concurrency.md) | Task scopes, Send/Share, channels, mutex, cancellation, deterministic scheduler | parallel-map and channel ownership-transfer examples | Q-013, Q-014 |
|
||||
| P4 | [phase-4-islands.md](phase-4-islands.md) | Islands, `iref`, transfer, freeze, `Frozen`, `Arc` | cyclic graph moves between tasks with no deep copy and no shared mutation | — |
|
||||
| P5 | [phase-5-atomics-and-memory-model.md](phase-5-atomics-and-memory-model.md) | Atomics, orderings, fences, weak-memory interpreter, schedule exploration, replay | atomic publication litmus/conformance tests | Q-015, Q-017 |
|
||||
@@ -58,17 +58,20 @@ Every registry code (`../reference/error-codes.md`) has a phase that must implem
|
||||
| E1001 type.mismatch | P0 | | E3101 effect.undeclared | P2 |
|
||||
| E1002 type.invalid_cast | P0 | | E3201 capability.missing | P2 |
|
||||
| E1010 init.read_uninitialized | P1 | | E3202 capability.widen | P2 |
|
||||
| E2001 ownership.use_after_move | P1 | | E4001 concurrency.not_send | P3 |
|
||||
| E2002 ownership.double_consume | P1 | | E4002 concurrency.not_share | P3 |
|
||||
| E2001 ownership.use_after_move | P2 | | E4001 concurrency.not_send | P3 |
|
||||
| E2002 ownership.double_consume | P2 | | E4002 concurrency.not_share | P3 |
|
||||
| E2101 borrow.mutable_alias | P1 | | E4101 concurrency.possible_data_race | P3 |
|
||||
| E2102 borrow.outlives_owner | P1 | | E4201 atomic.invalid_order | P5 |
|
||||
| E2103 memory.out_of_bounds | P1 | | E4301 task.live_child_escape | P3 |
|
||||
| E2104 memory.region_generation | P1 | | E4302 task.borrow_escape | P3 |
|
||||
| E2104 memory.region_generation | P2 | | E4302 task.borrow_escape | P3 |
|
||||
| E2110 island.escape | P4 | | E4303 io.buffer_in_flight | P3 |
|
||||
| E2111 island.foreign_mutable_edge | P4 | | E5001 air.invalid_ssa | P0 |
|
||||
| E3001 resource.use_after_consume | P2 | | E5002 air.invalid_cfg | P0 |
|
||||
| E3002 resource.leak | P2 | | E5101 verifier.resource_limit | P0 |
|
||||
| E6001 unsafe.required | P2 | | E6101 abi.unaligned_reference | P7 |
|
||||
| E2105 borrow.not_ended | P1 | | E2106 borrow.use_after_end | P1 |
|
||||
| E2107 borrow.not_owned | P1 | | E2108 borrow.escapes_frame | P1 |
|
||||
| E0001–E0006, E1003 | P0 | | T0001–T0007 P0, T0008 | P1 |
|
||||
|
||||
## Cross-cutting tracks
|
||||
|
||||
@@ -95,5 +98,5 @@ These run through all phases rather than belonging to one.
|
||||
| Phase | Status |
|
||||
|---|---|
|
||||
| P0 | done; AIR format 0 frozen as the semantic baseline (spec 07 §8.7) |
|
||||
| P1 | next |
|
||||
| P1 | in progress: RFC 0005 accepted and integrated (P1-1, P1-2) |
|
||||
| P2–P8 | not started |
|
||||
Reference in new issue
Block a user