ruby-changes:47402
From: nobu <ko1@a...>
Date: Sat, 5 Aug 2017 15:51:21 +0900 (JST)
Subject: [ruby-changes:47402] nobu:r59518 (trunk): vm_core.h: vm_call_flag_bits
nobu 2017-08-05 15:51:08 +0900 (Sat, 05 Aug 2017) New Revision: 59518 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59518 Log: vm_core.h: vm_call_flag_bits * vm_core.h (vm_call_flag_bits): define VM_CALL flags by using enum constants. Modified files: trunk/vm_core.h Index: vm_core.h =================================================================== --- vm_core.h (revision 59517) +++ vm_core.h (revision 59518) @@ -941,16 +941,30 @@ enum vm_check_match_type { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L941 #define VM_CHECKMATCH_TYPE_MASK 0x03 #define VM_CHECKMATCH_ARRAY 0x04 -#define VM_CALL_ARGS_SPLAT (0x01 << 0) /* m(*args) */ -#define VM_CALL_ARGS_BLOCKARG (0x01 << 1) /* m(&block) */ -#define VM_CALL_FCALL (0x01 << 2) /* m(...) */ -#define VM_CALL_VCALL (0x01 << 3) /* m */ -#define VM_CALL_ARGS_SIMPLE (0x01 << 4) /* (ci->flag & (SPLAT|BLOCKARG)) && blockiseq == NULL && ci->kw_arg == NULL */ -#define VM_CALL_BLOCKISEQ (0x01 << 5) /* has blockiseq */ -#define VM_CALL_KWARG (0x01 << 6) /* has kwarg */ -#define VM_CALL_TAILCALL (0x01 << 7) /* located at tail position */ -#define VM_CALL_SUPER (0x01 << 8) /* super */ -#define VM_CALL_OPT_SEND (0x01 << 9) /* internal flag */ +enum vm_call_flag_bits { + VM_CALL_ARGS_SPLAT_bit, /* m(*args) */ + VM_CALL_ARGS_BLOCKARG_bit, /* m(&block) */ + VM_CALL_FCALL_bit, /* m(...) */ + VM_CALL_VCALL_bit, /* m */ + VM_CALL_ARGS_SIMPLE_bit, /* (ci->flag & (SPLAT|BLOCKARG)) && blockiseq == NULL && ci->kw_arg == NULL */ + VM_CALL_BLOCKISEQ_bit, /* has blockiseq */ + VM_CALL_KWARG_bit, /* has kwarg */ + VM_CALL_TAILCALL_bit, /* located at tail position */ + VM_CALL_SUPER_bit, /* super */ + VM_CALL_OPT_SEND_bit, /* internal flag */ + VM_CALL__END +}; + +#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit) +#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit) +#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit) +#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit) +#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit) +#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit) +#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit) +#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit) +#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit) +#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit) enum vm_special_object_type { VM_SPECIAL_OBJECT_VMCORE = 1, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/