diff options
author | Koichi Sasada <[email protected]> | 2021-11-16 17:57:49 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-11-17 22:21:42 +0900 |
commit | b2255153cf2fe9d7b851c59cc09b358c0630e0a2 (patch) | |
tree | 7d4142a5872963a91d94bbc5103e904258eb83c6 /vm.c | |
parent | 84aba250315d7fea728a6708e33ae8bf11f607b2 (diff) |
`vm_empty_cc_for_super`
Same as `vm_empty_cc`, introduce a global variable which has
`.call_ = vm_call_super_method`. Use it if the `cme == NULL` on
`vm_search_super_method`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5122
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -439,6 +439,16 @@ static const struct rb_callcache vm_empty_cc = { } }; +static const struct rb_callcache vm_empty_cc_for_super = { + .flags = T_IMEMO | (imemo_callcache << FL_USHIFT) | VM_CALLCACHE_UNMARKABLE, + .klass = Qfalse, + .cme_ = NULL, + .call_ = vm_call_super_method, + .aux_ = { + .v = Qfalse, + } +}; + static void thread_free(void *ptr); void @@ -4176,6 +4186,12 @@ rb_vm_empty_cc(void) return &vm_empty_cc; } +MJIT_FUNC_EXPORTED const struct rb_callcache * +rb_vm_empty_cc_for_super(void) +{ + return &vm_empty_cc_for_super; +} + #endif /* #ifndef MJIT_HEADER */ #include "vm_call_iseq_optimized.inc" /* required from vm_insnhelper.c */ |