diff options
| author | eunhhu <[email protected]> | 2026-10-18 22:33:19 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-18 22:33:19 +0100 |
| commit | 1d255b735e92c2d6b360ed5ea150a1e42f6dd535 (patch) | |
| tree | 211072355a181bc9ddfa20ecfcb5beda27021ffe /core/test-module.c | |
| parent | a72a1a7acdf6c5ecc4a6668f6b9a3af16ce48555 (diff) | |
| download | pure-1d255b735e92c2d6b360ed5ea150a1e42f6dd535.tar.gz pure-1d255b735e92c2d6b360ed5ea150a1e42f6dd535.zip | |
027's 4f-1: a module's tables sized to it: PureModule's thirty-four tables of states, inputs, message fields, views (the columns the load makes among them, counted from the view and record entries first), handlers, records, record fields, functions and signature items point into one block the load lays out (lay_tables) and pure_module_release gives back, so PureModule is 2,752 bytes, not 24,320; a sanitized build poisons 16 bytes between tables, so reading past one is caught (none was); limits as they were; a test and five of research 044's timers gave the load a module never zeroed (it gives back what one holds), now zeroed; counts: b38 against b37 with batches within 0.25%, without batches matmul -0.45%, join +0.36%, knapsack +0.28%, BFS -0.25%; the bank's queries (s37 and s38 on one aup module in turns, three each) field -0.68%, found -0.51%, large -0.47%, the rest -0.11% to -0.20%; 027's 4f designed in four steps and 4f-1 as made
Diffstat (limited to 'core/test-module.c')
| -rw-r--r-- | core/test-module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/test-module.c b/core/test-module.c index 8950018..8014d63 100644 --- a/core/test-module.c +++ b/core/test-module.c @@ -3483,7 +3483,7 @@ static void lane_folds(void) { module_b.code[i].plan = module_b.code[i].shape = 0; } planned += module_a.view_plan[VIEWS]; - memset(module_b.view_plan, 0, sizeof(module_b.view_plan)); + memset(module_b.view_plan, 0, module_b.views * sizeof(*module_b.view_plan)); pure_jit_free(module_b.jit); /* its code changed: compiled again (021) */ module_b.jit = pure_jit_make(&module_b); PureApp a, b; @@ -4079,7 +4079,7 @@ static void ranges(void) { !module_a.code[45].range && module_a.view_range[6] && module_a.code[78].range && !module_a.code[102].range && !module_a.code[118].range && module_a.code[118].plan); for (uint32_t i = 0; i < module_b.code_count; ++i) module_b.code[i].range = 0; - memset(module_b.view_range, 0, sizeof(module_b.view_range)); + memset(module_b.view_range, 0, module_b.views * sizeof(*module_b.view_range)); pure_jit_free(module_b.jit); /* its code changed: compiled again (021) */ module_b.jit = pure_jit_make(&module_b); uint32_t seed = 0x7a45e11u; @@ -5426,7 +5426,7 @@ static void output_meaning(void) { NULL, 0}; Spec none = {nums, 1, none_inputs, 1, NULL, 0, none_handlers, 1, none_code, 2, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0}; - PureModule without; + PureModule without = {0}; CHECK(load(was, &module_a) == PURE_OK && load(now, &module_b) == PURE_OK && load(none, &without) == PURE_OK); CHECK(pure_module_shape(&module_a, 1) != pure_module_shape(&module_b, 1)); char *path = new_store(); |
