diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 16:31:25 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 16:31:25 +0000 |
commit | b0569e3dde14df7b9acc703c6a4c7325573094f5 (patch) | |
tree | 33bb63496d9256f3382200d50969f6057e561ca8 | |
parent | a44c3bb26f9f32e6f5a63c80f5d6a7ef096caec5 (diff) | |
download | bundler-b0569e3dde14df7b9acc703c6a4c7325573094f5.tar.gz |
* vm_insnhelper.h: rename REG_(CFP|PC|SP|EP) to VM_REG_....
[Bug #12527]
* vm_exec.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | vm_exec.c | 8 | ||||
-rw-r--r-- | vm_insnhelper.h | 34 |
3 files changed, 28 insertions, 21 deletions
@@ -1,3 +1,10 @@ +Sun Nov 6 01:28:41 2016 Koichi Sasada <ko1@atdot.net> + + * vm_insnhelper.h: rename REG_(CFP|PC|SP|EP) to VM_REG_.... + [Bug #12527] + + * vm_exec.c: ditto. + Sun Nov 6 00:25:11 2016 Sho Hashimoto <sho.hsmt@gmail.com> * enumerator.c (InitVM_Enumerator): Enumerator::Lazy#chunk_while @@ -88,16 +88,16 @@ vm_exec_core(rb_thread_t *th, VALUE initial) #undef RESTORE_REGS #define RESTORE_REGS() \ { \ - REG_CFP = th->cfp; \ + VM_REG_CFP = th->cfp; \ reg_pc = reg_cfp->pc; \ } -#undef REG_PC -#define REG_PC reg_pc +#undef VM_REG_PC +#define VM_REG_PC reg_pc #undef GET_PC #define GET_PC() (reg_pc) #undef SET_PC -#define SET_PC(x) (reg_cfp->pc = REG_PC = (x)) +#define SET_PC(x) (reg_cfp->pc = VM_REG_PC = (x)) #endif #if OPT_TOKEN_THREADED_CODE || OPT_DIRECT_THREADED_CODE diff --git a/vm_insnhelper.h b/vm_insnhelper.h index 18fabde187..de2fc5bd39 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -41,13 +41,13 @@ extern VALUE ruby_vm_const_missing_count; /* deal with registers */ /**********************************************************/ -#define REG_CFP (reg_cfp) -#define REG_PC (REG_CFP->pc) -#define REG_SP (REG_CFP->sp) -#define REG_EP (REG_CFP->ep) +#define VM_REG_CFP (reg_cfp) +#define VM_REG_PC (VM_REG_CFP->pc) +#define VM_REG_SP (VM_REG_CFP->sp) +#define VM_REG_EP (VM_REG_CFP->ep) #define RESTORE_REGS() do { \ - REG_CFP = th->cfp; \ + VM_REG_CFP = th->cfp; \ } while (0) #define REG_A reg_a @@ -74,28 +74,28 @@ enum vm_regan_acttype { #endif /* PC */ -#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, REG_PC)) -#define SET_PC(x) (REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x)))) +#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC)) +#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x)))) #define GET_CURRENT_INSN() (*GET_PC()) #define GET_OPERAND(n) (GET_PC()[(n)]) -#define ADD_PC(n) (SET_PC(REG_PC + (n))) -#define JUMP(dst) (REG_PC += (dst)) +#define ADD_PC(n) (SET_PC(VM_REG_PC + (n))) +#define JUMP(dst) (VM_REG_PC += (dst)) /* frame pointer, environment pointer */ -#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, REG_CFP)) -#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, REG_EP)) -#define SET_EP(x) (REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x)))) +#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP)) +#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP)) +#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x)))) #define GET_LEP() (VM_EP_LEP(GET_EP())) /* SP */ -#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, REG_SP)) -#define SET_SP(x) (REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) -#define INC_SP(x) (REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) -#define DEC_SP(x) (REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) +#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP)) +#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) +#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) +#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 GET_SP_COUNT() (REG_SP - th->stack) +#define GET_SP_COUNT() (VM_REG_SP - th->stack) /* instruction sequence C struct */ #define GET_ISEQ() (GET_CFP()->iseq) |