diff options
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r-- | vm_insnhelper.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h index 6c1de01a62..56e63cd841 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -112,7 +112,6 @@ enum vm_regan_acttype { #define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) #define SET_SV(x) (*GET_SP() = (x)) /* set current stack value as x */ -#define ADJ_SP(x) INC_SP(x) /* instruction sequence C struct */ #define GET_ISEQ() (GET_CFP()->iseq) @@ -184,9 +183,6 @@ enum vm_regan_acttype { #define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL]) -#define WIDTH_OF_opt_send_without_block \ - ((rb_snum_t)attr_width_opt_send_without_block(0, 0)) - /**********************************************************/ /* deal with control flow 3: exception */ /**********************************************************/ @@ -197,9 +193,8 @@ enum vm_regan_acttype { /**********************************************************/ #if VM_CHECK_MODE > 0 -#define DECLARE_CANARY bool leaf; VALUE *canary #define SETUP_CANARY() \ - if ((leaf = INSN_ATTR(leaf))) { \ + if (leaf) { \ canary = GET_SP(); \ SET_SV(vm_stack_canary); \ } @@ -208,7 +203,6 @@ enum vm_regan_acttype { vm_canary_is_found_dead(INSN_ATTR(bin), *canary); \ } #else -#define DECLARE_CANARY /* void */ #define SETUP_CANARY() /* void */ #define CHECK_CANARY() /* void */ #endif @@ -231,6 +225,16 @@ enum vm_regan_acttype { #define USE_IC_FOR_SPECIALIZED_METHOD 1 #endif +#ifndef MJIT_HEADER +#define CALL_SIMPLE_METHOD() do { \ + rb_snum_t x = leaf ? INSN_ATTR(width) : 0; \ + rb_snum_t y = attr_width_opt_send_without_block(0, 0); \ + rb_snum_t z = x - y; \ + ADD_PC(z); \ + DISPATCH_ORIGINAL_INSN(opt_send_without_block); \ +} while (0) +#endif + #define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial) #define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state) #define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state) |