diff options
| author | eunhhu <[email protected]> | 2026-10-18 16:44:17 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-18 16:44:17 +0100 |
| commit | 433f56c29b26b83cd2991b4a834b427fae3e75d4 (patch) | |
| tree | 2ef84f30892e5dcabb196d63b1016d255d759beb /core/module-list.c | |
| parent | a9adaf2a1a62e5dd37f0067653b35e9cfa2c1860 (diff) | |
| download | pure-433f56c29b26b83cd2991b4a834b427fae3e75d4.tar.gz pure-433f56c29b26b83cd2991b4a834b427fae3e75d4.zip | |
Module executor: a call's frame counted in the event's room by a table, as gas is (PURE_CALL_*: 256 a frame, 64 a value of its stack's height, 8 a local, 128 a loop it nests, 1024 a list of its own, 128 a held value, 16 a register; each at least what it stands for, checked as it compiles), not by the implementation's sizes: a module's calls fail at the same depth on every machine and build; a call's list let go is kept for the next calls unless what it keeps empty passes what a frame counts for it
Diffstat (limited to 'core/module-list.c')
| -rw-r--r-- | core/module-list.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/module-list.c b/core/module-list.c index 67fbbdb..57e44c4 100644 --- a/core/module-list.c +++ b/core/module-list.c @@ -1580,6 +1580,8 @@ static bool logged(PureList *list, const PureUndo *undo) { /* ---- The list */ +_Static_assert(sizeof(PureList) <= PURE_CALL_LIST, "a call's list counts at least its own bytes (module.h)"); + PureList *pure_list_new(unsigned fields, const uint8_t *kinds) { if (fields > 16) return NULL; PureList *list = calloc(1, sizeof(*list)); |
