diff options
author | John Hawthorn <john@hawthorn.email> | 2022-09-14 13:15:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-14 16:15:55 -0400 |
commit | f98d6d3f389e8e46775c5895ddc1a3eec4544533 (patch) | |
tree | 1267208755ae53ad583c71a81826772ed31ebcdd /yjit.c | |
parent | d5cdc2edd02eb6990d045c932aaedb60213143e1 (diff) |
YJIT: Implement specialized respond_to? (#6363)
* Add rb_callable_method_entry_or_negative
* YJIT: Implement specialized respond_to?
This implements a specialized respond_to? in YJIT.
* Update yjit/src/codegen.rs
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -486,7 +486,11 @@ rb_METHOD_ENTRY_VISI(const rb_callable_method_entry_t *me) rb_method_type_t rb_get_cme_def_type(const rb_callable_method_entry_t *cme) { - return cme->def->type; + if (UNDEFINED_METHOD_ENTRY_P(cme)) { + return VM_METHOD_TYPE_UNDEF; + } else { + return cme->def->type; + } } ID |