Commit ff4c5a4
committed
feat: add ZRTL effects plugin for algebraic effects runtime
Implements runtime support for algebraic effects:
- Thread-local handler stack with effect ID cache
- Handler management: push_handler, pop_handler, get_handler
- Effect dispatch: perform (runtime lookup), perform_direct (static)
- State management: alloc_state, free_state, get_state
- Effect ID generation via FNV-1a hash
Exported symbols:
- $Effects$push_handler, $Effects$pop_handler, $Effects$get_handler
- $Effects$has_handler, $Effects$handler_depth, $Effects$get_state
- $Effects$perform, $Effects$perform_direct
- $Effects$alloc_state, $Effects$free_state
- $Effects$id_from_name, $Effects$debug_stack, $Effects$clear_all
All 4 tests pass.1 parent e7b255b commit ff4c5a4
3 files changed
Lines changed: 605 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments