From dcb6e7330699e2b4b476ab5caff8e3d0508c500c Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 12 Dec 2012 04:39:48 +0000 Subject: 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 --- vm_insnhelper.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index dacde9e55e..294369504a 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -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 -- cgit v1.2.3