diff options
| author | André Luiz Tiago Soares <andre.soares@altxtech.net> | 2025-09-22 12:28:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-22 12:28:27 -0400 |
| commit | 6c0a74e55ad1c15804297b3a471444f0cae5c058 (patch) | |
| tree | c9fd15d0e43265f324f371e02f28c0c61cad5ef1 /include/ruby/internal | |
| parent | 01de72fcf82e858aeba0a55b2f1527efe8fda062 (diff) | |
ZJIT: Refactor NewRangeFixnum (#14607)
## Context
#14409
https://github.com/ruby/ruby/pull/14409#discussion_r2350238583
>You may have noticed that this doesn't produce a New range instruction. For that you probably need to use a local variable (makes it harder for the bytecode compiler to reason about, but the JIT sees through it). If you have time, please rewrite these tests.
https://github.com/ruby/ruby/pull/14409#discussion_r2350240389
>There's some code above to do this for you: see arguments_likely_fixnums and coerce something or other
## Changes
### Refactor tests
Modify tests force the usage of `NewRangeFixnum` instruction and make tests names more consistent.
### Refactor optimize ranges
Didn't found `arguments_likely_fixnums` to be applicable unless we enable profiling for `NewRange` and change the criteria of when the optimization fires. But there were other ways to clean up the code.
Simplify the logic and move it to `type_specialize`. Deleted the standalone `optimize_ranges` function.
Diffstat (limited to 'include/ruby/internal')
0 files changed, 0 insertions, 0 deletions
