diff options
author | Takashi Kokubun <[email protected]> | 2024-02-23 11:08:09 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-23 19:08:09 +0000 |
commit | 8a6740c70edf39cdf6230659d191240c43dc6d22 (patch) | |
tree | 33ccb69b507392b7bc842dfe97e904f8a5bb4ef9 /object.c | |
parent | 50ace992c75724aac6765b944f9017e21901e276 (diff) |
YJIT: Lazily push a frame for specialized C funcs (#10080)
* YJIT: Lazily push a frame for specialized C funcs
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
* Fix a comment on pc_to_cfunc
* Rename rb_yjit_check_pc to rb_yjit_lazy_push_frame
* Rename it to jit_prepare_lazy_frame_call
* Fix a typo
* Optimize String#getbyte as well
* Optimize String#byteslice as well
---------
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -42,6 +42,7 @@ #include "ruby/assert.h" #include "builtin.h" #include "shape.h" +#include "yjit.h" /* Flags of RObject * @@ -3238,6 +3239,7 @@ rb_to_integer_with_id_exception(VALUE val, const char *method, ID mid, int raise VALUE v; if (RB_INTEGER_TYPE_P(val)) return val; + rb_yjit_lazy_push_frame(GET_EC()->cfp->pc); v = try_to_int(val, mid, raise); if (!raise && NIL_P(v)) return Qnil; if (!RB_INTEGER_TYPE_P(v)) { |