This commit is contained in:
2026-03-24 13:40:36 +00:00
parent 73dc0c4cb2
commit 29056ce0ad
6 changed files with 31 additions and 67 deletions
+8 -6
View File
@@ -81,13 +81,15 @@ TrapInfo {
| `TRAP_OOB` | Out of bounds | Access beyond allowed bounds |
| `TRAP_INVALID_LOCAL` | Invalid local | Local slot index out of bounds |
### 5.2 Heap / Gate
### 5.2 Execution & Types
| Code | Name | Meaning |
| ------------------- | -------------- | -------------------------- |
| `TRAP_INVALID_GATE` | Invalid gate | Non-existent gate handle |
| `TRAP_DEAD_GATE` | Dead gate | Gate with refcount = 0 |
| `TRAP_TYPE` | Type violation | Heap or gate type mismatch |
| Code | Name | Meaning |
| ------------------------- | -------------------- | ------------------------------------------------------ |
| `TRAP_ILLEGAL_INSTRUCTION`| Illegal instruction | Unknown/invalid opcode encountered |
| `TRAP_TYPE` | Type violation | Type mismatch for operation or syscall argument types |
| `TRAP_DIV_ZERO` | Divide by zero | Division/modulo by zero |
| `TRAP_INVALID_FUNC` | Invalid function | Function index not present in function table |
| `TRAP_BAD_RET_SLOTS` | Bad return slots | Stack height mismatch at return |
### 5.3 System