diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-13 05:49:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-13 05:49:43 +0000 |
commit | 5dc87d5ba3093db578260b33d99ba00b500e7c95 (patch) | |
tree | 0961a34f48b7d7e38dc427d5c9bdb42c754d074f /vm_insnhelper.h | |
parent | c2c015704030b14874603b569e60afb25d400698 (diff) |
insns.def: float comparison
* insns.def (opt_lt, opt_le, opt_gt, opt_ge): optimize flonum and
on-heap float comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r-- | vm_insnhelper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h index de2fc5bd39..33e3f434cd 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -166,6 +166,8 @@ enum vm_regan_acttype { #else #define FLONUM_2_P(a, b) 0 #endif +#define FLOAT_HEAP_P(x) (!SPECIAL_CONST_P(x) && RBASIC_CLASS(x) == rb_cFloat) +#define FLOAT_INSTANCE_P(x) (FLONUM_P(x) || FLOAT_HEAP_P(x)) #ifndef USE_IC_FOR_SPECIALIZED_METHOD #define USE_IC_FOR_SPECIALIZED_METHOD 1 |