mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* insnhelper.h, insns.def (DEC_SP): shoudn't use unary minus operator
in pointer operation. some compilers (such as VC++8 x64) cannot deal it with expected way. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
78029f00d5
commit
5f05c269e9
3 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Jun 6 02:40:20 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* insnhelper.h, insns.def (DEC_SP): shoudn't use unary minus operator
|
||||
in pointer operation. some compilers (such as VC++8 x64) cannot deal
|
||||
it with expected way.
|
||||
|
||||
Wed Jun 6 02:19:48 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* parse.y (new_yield), compile.c (iseq_compile_each): fix
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
#define PUSH(x) (SET_SV(x), INC_SP(1))
|
||||
#define TOPN(n) (*(GET_SP()-(n)-1))
|
||||
#define POPN(n) (INC_SP(-(n)))
|
||||
#define POP() (INC_SP(-1))
|
||||
#define POPN(n) (DEC_SP(n))
|
||||
#define POP() (DEC_SP(1))
|
||||
#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
|
||||
|
||||
#define GET_TOS() (tos) /* dummy */
|
||||
|
@ -84,6 +84,7 @@
|
|||
#define GET_SP() (USAGE_ANALYSIS_REGISTER_HELPER(1, 0, REG_SP))
|
||||
#define SET_SP(x) (REG_SP = (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x))))
|
||||
#define INC_SP(x) (REG_SP += (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x))))
|
||||
#define DEC_SP(x) (REG_SP -= (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x))))
|
||||
#define SET_SV(x) (*GET_SP() = (x))
|
||||
/* set current stack value as x */
|
||||
|
||||
|
|
|
@ -1190,7 +1190,7 @@ send
|
|||
mn = rb_method_node(klass, id);
|
||||
|
||||
num -= 1;
|
||||
INC_SP(-1);
|
||||
DEC_SP(1);
|
||||
}
|
||||
|
||||
if (node->nd_cfnc == rb_f_funcall) {
|
||||
|
@ -1344,7 +1344,7 @@ invokeblock
|
|||
}
|
||||
}
|
||||
|
||||
INC_SP(-argc);
|
||||
DEC_SP(argc);
|
||||
argc = th_yield_setup_args(th, iseq, argc, GET_SP(),
|
||||
block_proc_is_lambda(block->proc));
|
||||
INC_SP(argc);
|
||||
|
|
Loading…
Add table
Reference in a new issue