Repository navigation
feat(testbench)!: keep strings in a heap referenced from state memory - #1679
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Queued — the merge queue status continues in this comment ↓. |
42f160c to
ed3261e
Compare
Revision history
|
|
This pull request is part of a Mergify stack:
|
Merge Queue Status
This pull request spent 1 hour 19 minutes 18 seconds in the queue, including 14 minutes 22 seconds running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for
All conditions
Requeued — the merge queue status continues in this comment ↓. |
Testbench string variables now hold 32-bit handles into a per-simulator heap instead of keys into a side table. This is the first step of the shared string/class runtime design (#1400): one heap, handles that stay position independent, and a collector whose roots are the typed handle slots of state memory. - Add `celox-heap`: interned, immutable strings, so equal contents have equal handles and stores, commits, change detection and `==` stay integer operations. Handle 0 is `""`, the value of zero-initialized memory. A mark-sweep collection frees strings no root refers to. - Record each state object's value kind in `VariableMetadata`. Veryl `string` elements become 32-bit two-state handle slots. - The testbench VM loads and stores handles in those slots. Collections run between sequential statements and between concurrent process polls, with the saved temporaries of suspended processes as extra roots. This also gives each process its own string temporaries, which the old side table shared. - Checkpoints keep the heap. State files record referenced strings by contents in a new strings section and re-intern them on load, so they no longer reject testbench strings and stay portable between builds. - VCD output leaves handle slots out until strings have a waveform representation. BREAKING CHANGE: `celox_testbench::TestbenchStrings` and `CompiledExpr::eval_with_strings` are removed; evaluate with `CompiledExpr::eval_with_heap` and a `celox_heap::Heap`. State files that contain strings set a new flag and are not readable by older builds. Refs #1400 Change-Id: Idff2d83dfd8e9a4e706f73087b77d6292a1b990a
ed3261e to
4289f08
Compare
Merge Queue Status
This pull request spent 1 hour 28 minutes 14 seconds in the queue, including 1 hour 27 minutes 32 seconds running CI. Required conditions to merge
|
Testbench string variables now hold 32-bit handles into a per-simulator
heap instead of keys into a side table. This is the first step of the
shared string/class runtime design (#1400): one heap, handles that stay
position independent, and a collector whose roots are the typed handle
slots of state memory.
celox-heap: interned, immutable strings, so equal contents haveequal handles and stores, commits, change detection and
==stayinteger operations. Handle 0 is
"", the value of zero-initializedmemory. A mark-sweep collection frees strings no root refers to.
VariableMetadata. Verylstringelements become 32-bit two-state handle slots.run between sequential statements and between concurrent process polls,
with the saved temporaries of suspended processes as extra roots. This
also gives each process its own string temporaries, which the old
side table shared.
contents in a new strings section and re-intern them on load, so they
no longer reject testbench strings and stay portable between builds.
representation.
BREAKING CHANGE:
celox_testbench::TestbenchStringsandCompiledExpr::eval_with_stringsare removed; evaluate withCompiledExpr::eval_with_heapand acelox_heap::Heap. State files thatcontain strings set a new flag and are not readable by older builds.
Refs #1400