This commit is contained in:
Nilton Constantino
2026-01-31 17:55:35 +00:00
parent 9fa337687f
commit 9d484a9636
3 changed files with 171 additions and 37 deletions
-28
View File
@@ -1,31 +1,3 @@
## PR-06 — Control flow opcodes: jumps, conditional branches, structured “if”
**Why:** `if` must be predictable and verifier-safe.
### Scope
* Implement opcodes:
* `JMP <i32 rel>`
* `JMP_IF_TRUE <i32 rel>`
* `JMP_IF_FALSE <i32 rel>`
* Verifier rules:
* targets must be valid instruction boundaries
* stack height at join points must match
### Tests
* nested if
* if with empty branches
* branch join mismatch rejected
### Acceptance
* Control flow is safe; no implicit stack juggling.
---
## PR-07 — Calling convention v0: CALL / RET / multi-slot returns
**Why:** Without a correct call model, PBS isn’t executable.