diff options
| author | Jacob <jacob.denbeaux@shopify.com> | 2026-01-16 12:08:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-16 17:08:20 +0000 |
| commit | bc6c895d7bce16871321fcb22147a2d35179caaf (patch) | |
| tree | f46a2eb61c44765f6be1444d432a26d3c11ce339 /spec/ruby/library/win32ole/win32ole_param/default_spec.rb | |
| parent | 91744cd2025b3c18cd48b9ac3eec8412c932fac6 (diff) | |
**Progress**
I've added a new directory, `zjit/src/hir_effect`. It follows the same structure as `zjit/src/hir_type` and includes:
- a ruby script to generate a rust file containing a bitset of effects we want to track
- a modified `hir.rs` to include an `effects_of` function that catalogs effects for each HIR instruction, similar to `infer_type`. Right now these effects are not specialized, all instructions currently return the top of the lattice (any effect)
- a module file for effects at `zjit/src/hir_effect/mod.rs` that again, mirrors `zjit/src/hir_type/mod.rs`. This contains a lot of helper functions and lattice operations like union and intersection
**Design Idea**
The effect system is bitset-based rather than range-based. This is the first kind of effect system described in [Max's blog post](https://bernsteinbear.com/blog/compiler-effects/).
Practically, having effects defined for each HIR instruction should allow us to have better generalization than the implicit effect system we have for c functions that we annotation as elidable, leaf, etc. Additionally, this could allow us to reason about the effects of multiple HIR instructions unioned together, something I don't believe currently exists.
**Practical Goals**
This PR replaces `has_effects` with a new effects-based `is_elidable` function. This has no behavior change to the JIT, but will make it easier to reason about effects of basic blocks and CCalls with the new design. We may be able to accomplish other quality of life improvements, such as consolidation of `nogc`, `leaf`, and other annotations.
Diffstat (limited to 'spec/ruby/library/win32ole/win32ole_param/default_spec.rb')
0 files changed, 0 insertions, 0 deletions
