This commit is contained in:
Nilton Constantino
2026-01-29 17:16:01 +00:00
parent fe00eda925
commit 603c8e7862
2 changed files with 104 additions and 55 deletions
-29
View File
@@ -1,32 +1,3 @@
# PR-21 — Distinguish `peek`, `borrow`, and `mutate` in Core IR
### Goal
Restore the semantic distinction mandated by PBS.
### Required Semantics
| Operation | Effect |
| --------- | ------------------------------- |
| `peek` | Copy storage → stack value |
| `borrow` | Temporary read-only view |
| `mutate` | Temporary mutable view + commit |
### Required Changes
* Lower PBS `peek` → `BeginPeek` / `EndPeek`
* Lower PBS `borrow` → `BeginBorrow` / `EndBorrow`
* Lower PBS `mutate` → `BeginMutate` / `EndMutate`
These **must not** share the same lowering path.
### Tests
* PBS snippet with all three operations
* Assert distinct Core IR instruction sequences
---
# PR-22 — Make Allocation Shape Explicit in Core IR
### Goal