diff --git a/ChangeLog b/ChangeLog index e1efffa9b1..2fb5bc1e1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri May 23 02:29:14 2008 Koichi Sasada + + * insns.def (opt_gt|ge|lt|le): use values directly to compare. + Fri May 23 01:15:09 2008 Koichi Sasada * eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h, diff --git a/insns.def b/insns.def index acd377ae4d..348f956ed6 100644 --- a/insns.def +++ b/insns.def @@ -1692,7 +1692,7 @@ opt_lt { if (FIXNUM_2_P(recv, obj) && BASIC_OP_UNREDEFINED_P(BOP_LT)) { - long a = FIX2LONG(recv), b = FIX2LONG(obj); + SIGNED_VALUE a = recv, b = obj; if (a < b) { val = Qtrue; @@ -1721,7 +1721,7 @@ opt_le { if (FIXNUM_2_P(recv, obj) && BASIC_OP_UNREDEFINED_P(BOP_LE)) { - long a = FIX2LONG(recv), b = FIX2LONG(obj); + SIGNED_VALUE a = recv, b = obj; if (a <= b) { val = Qtrue; @@ -1751,7 +1751,7 @@ opt_gt { if (FIXNUM_2_P(recv, obj) && BASIC_OP_UNREDEFINED_P(BOP_GT)) { - long a = FIX2LONG(recv), b = FIX2LONG(obj); + SIGNED_VALUE a = recv, b = obj; if (a > b) { val = Qtrue; @@ -1780,7 +1780,7 @@ opt_ge { if (FIXNUM_2_P(recv, obj) && BASIC_OP_UNREDEFINED_P(BOP_GE)) { - long a = FIX2LONG(recv), b = FIX2LONG(obj); + SIGNED_VALUE a = recv, b = obj; if (a >= b) { val = Qtrue;