aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r--vm_insnhelper.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 99555fd4ed..c96522fc98 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -124,6 +124,14 @@ enum vm_regan_acttype {
if (LIKELY(enabled)) ((cc)->call = (func)); \
} while (0)
+#define CC_SET_ME(cc, newme) do { \
+ CALL_CACHE ccx = (cc); \
+ const rb_callable_method_entry_t *mex = (newme); \
+ const rb_method_definition_t *defx = mex ? mex->def : NULL; \
+ ccx->me = mex; \
+ ccx->def = defx; \
+} while (0)
+
#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
/**********************************************************/