pr4.5
This commit is contained in:
@@ -1,56 +1,3 @@
|
||||
# PR-4.5 — Multi-Return (`ret_slots`) Verification
|
||||
|
||||
### Briefing
|
||||
|
||||
The new ABI supports multi-return via `ret_slots`. The verifier must ensure the stack shape matches the declared return slot count.
|
||||
|
||||
### Target
|
||||
|
||||
* Validate return slot counts at call and return sites.
|
||||
|
||||
### Work items
|
||||
|
||||
* For each function:
|
||||
|
||||
* Read declared `ret_slots`.
|
||||
* At `RET`:
|
||||
|
||||
* Ensure stack contains exactly the required number of slots.
|
||||
* At call sites:
|
||||
|
||||
* Ensure caller expects correct number of return slots.
|
||||
|
||||
### Acceptance checklist
|
||||
|
||||
* [ ] Mismatched return slot counts are rejected.
|
||||
* [ ] Correct programs pass.
|
||||
* [ ] `cargo test` passes.
|
||||
|
||||
### Tests
|
||||
|
||||
* Add tests:
|
||||
|
||||
* Too few return slots → verifier error.
|
||||
* Too many return slots → verifier error.
|
||||
* Correct return slots → passes.
|
||||
|
||||
### Junie instructions
|
||||
|
||||
**You MAY:**
|
||||
|
||||
* Use function metadata to validate returns.
|
||||
|
||||
**You MUST NOT:**
|
||||
|
||||
* Change calling convention semantics.
|
||||
* Modify function metadata layout.
|
||||
|
||||
**If unclear:**
|
||||
|
||||
* Ask before implementing slot rules.
|
||||
|
||||
---
|
||||
|
||||
# PR-4.6 — Verifier Error Model Consolidation
|
||||
|
||||
### Briefing
|
||||
|
||||
Reference in New Issue
Block a user