1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_insnhelper.c: common code

* vm_insnhelper.c (vm_getivar, vm_setivar): unify common code
  irrelevant to the condition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-12-12 04:39:48 +00:00
parent 34fb7d7830
commit dcb6e73306

View file

@ -537,12 +537,8 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
}
return val;
}
else {
return rb_ivar_get(obj, id);
}
#else
#endif /* USE_IC_FOR_IVAR */
return rb_ivar_get(obj, id);
#endif
}
static inline void
@ -587,10 +583,8 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic, rb_call_info_t *ci, int is_attr)
/* fall through */
}
}
#endif /* USE_IC_FOR_IVAR */
rb_ivar_set(obj, id, val);
#else
rb_ivar_set(obj, id, val);
#endif
}
static VALUE