зеркало из https://github.com/github/ruby.git
* insnhelper.h (INC_SP): shouldn't cast ``x'' to unsigned type because
it might be a negative value. * insnhelper.h, insns.def: shoudn't use unary minus operator in index operator. some compilers (such as VC++8 x64) cannot deal it with expected way. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b8cb3679bb
Коммит
62872956b6
|
@ -1,3 +1,12 @@
|
|||
Fri Jun 1 13:02:35 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* insnhelper.h (INC_SP): shouldn't cast ``x'' to unsigned type because
|
||||
it might be a negative value.
|
||||
|
||||
* insnhelper.h, insns.def: shoudn't use unary minus operator in index
|
||||
operator. some compilers (such as VC++8 x64) cannot deal it with
|
||||
expected way.
|
||||
|
||||
Fri Jun 1 11:33:40 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* numeric.c (num_round): should convert self to Float.
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define TOPN(n) (*(GET_SP()-(n)-1))
|
||||
#define POPN(n) (INC_SP(-(n)))
|
||||
#define POP() (INC_SP(-1))
|
||||
#define STACK_ADDR_FROM_TOP(n) (&GET_SP()[-(n)])
|
||||
#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
|
||||
|
||||
#define GET_TOS() (tos) /* dummy */
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
|||
/* SP */
|
||||
#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 += ((VALUE)(USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (VALUE)(x)))))
|
||||
#define INC_SP(x) (REG_SP += (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x))))
|
||||
#define SET_SV(x) (*GET_SP() = (x))
|
||||
/* set current stack value as x */
|
||||
|
||||
|
@ -98,7 +98,7 @@
|
|||
/* deal with variables */
|
||||
/**********************************************************/
|
||||
|
||||
#define GET_CURRENT_DYNAMIC(idx) (GET_DFP()[-idx])
|
||||
#define GET_CURRENT_DYNAMIC(idx) (*(GET_DFP() -(idx)))
|
||||
#define GET_PREV_DFP(dfp) ((VALUE *)((dfp)[0] & ~0x03))
|
||||
|
||||
#define GET_GLOBAL(entry) rb_gvar_get((struct global_entry*)entry)
|
||||
|
|
|
@ -806,7 +806,7 @@ setn
|
|||
(..., VALUE val)
|
||||
(VALUE val) // inc += 0
|
||||
{
|
||||
GET_SP()[-n] = val;
|
||||
TOPN(n-1) = val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1183,8 +1183,8 @@ send
|
|||
id = SYMBOL_P(sym) ? SYM2ID(sym) : rb_to_id(sym);
|
||||
|
||||
/* shift arguments */
|
||||
for (i=1; i<num; i++) {
|
||||
GET_SP()[-num+i-1] = GET_SP()[(-num+i-1)+1];
|
||||
for (i=num-1; i>0; i--) {
|
||||
TOPN(i) = TOPN(i-1);
|
||||
}
|
||||
|
||||
mn = rb_method_node(klass, id);
|
||||
|
|
Загрузка…
Ссылка в новой задаче