diff options
author | John Hawthorn <john@hawthorn.email> | 2021-11-25 15:10:42 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 15:10:42 -0800 |
commit | b6f543d4aea38333521b8b2333c8ec675a3ebe8f (patch) | |
tree | 8799d8efadde3a056ba423e8ccf8d3e44b2b6136 /spec | |
parent | de9a1e4a9654ea305f11ce8602ee32f394e44338 (diff) |
YJIT: Introduce jit_putobject (#5179)
* YJIT: Introduce jit_putobject
This extracts the logic previously inside gen_putobject to a more
reusable helper method jit_putobject.
The motivation for this is that it both simplifies the implementation of
other instructions, and other instructions can reuse the optimized
behaviour for 32-bit special constants (most importantly
opt_getinlinecache).
This commit also expands the optimization to use a mov directly to
memory when we encounter a 32-bit immediate constant. Previously it
covered fixnums and Qtrue/Qfalse, now it will cover any SPECIAL_CONST_P
value which can be represented as a 32-bit immediate. Notably, this
includes static symbols, and Qnil.
* Style touchups and a comment
* delete empty line
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Notes
Notes:
Merged-By: jhawthorn <john@hawthorn.email>
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions