summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-14 11:25:36 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-14 11:25:36 (GMT)
commit589d80e7e337f166777d8f99f190a45013e6f050 (patch)
treeecbdc2b780cbc48e582c134e5852b50d503548c5 /vm_insnhelper.c
parentf89fe59db4bf1768d5f6480d15b67f8ebc24d5b9 (diff)
vm_opts.h: share USE_IC_FOR_IVAR as OPT_IC_FOR_IVAR
with mjit_compile.c (tool/ruby_vm/views/_mjit_compile_getivar.erb). mjit_compile.c: ditto tool/ruby_vm/views/_mjit_compile_getivar.erb: ditto vm_opts.h: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index d934372..7bc868d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -950,15 +950,11 @@ vm_search_const_defined_class(const VALUE cbase, ID id)
return 0;
}
-#ifndef USE_IC_FOR_IVAR
-#define USE_IC_FOR_IVAR 1
-#endif
-
ALWAYS_INLINE(static VALUE vm_getivar(VALUE, ID, IC, struct rb_call_cache *, int));
static inline VALUE
vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr)
{
-#if USE_IC_FOR_IVAR
+#if OPT_IC_FOR_IVAR
if (LIKELY(RB_TYPE_P(obj, T_OBJECT))) {
VALUE val = Qundef;
if (LIKELY(is_attr ?
@@ -1000,7 +996,7 @@ vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr)
else {
RB_DEBUG_COUNTER_INC(ivar_get_ic_miss_noobject);
}
-#endif /* USE_IC_FOR_IVAR */
+#endif /* OPT_IC_FOR_IVAR */
RB_DEBUG_COUNTER_INC(ivar_get_ic_miss);
if (is_attr)
@@ -1011,7 +1007,7 @@ vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr)
static inline VALUE
vm_setivar(VALUE obj, ID id, VALUE val, IC ic, struct rb_call_cache *cc, int is_attr)
{
-#if USE_IC_FOR_IVAR
+#if OPT_IC_FOR_IVAR
rb_check_frozen_internal(obj);
if (LIKELY(RB_TYPE_P(obj, T_OBJECT))) {
@@ -1051,7 +1047,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic, struct rb_call_cache *cc, int is_
else {
RB_DEBUG_COUNTER_INC(ivar_set_ic_miss_noobject);
}
-#endif /* USE_IC_FOR_IVAR */
+#endif /* OPT_IC_FOR_IVAR */
RB_DEBUG_COUNTER_INC(ivar_set_ic_miss);
return rb_ivar_set(obj, id, val);
}