diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-12 04:39:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-12 04:39:48 +0000 |
commit | dcb6e7330699e2b4b476ab5caff8e3d0508c500c (patch) | |
tree | 0dd0cc77a9eda73a7ab5114b35ca65254cb053f5 /vm_insnhelper.c | |
parent | 34fb7d783045dd4bb7b6dd49e6a1e922b7b947ff (diff) | |
download | ruby-dcb6e7330699e2b4b476ab5caff8e3d0508c500c.tar.gz |
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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 10 |
1 files changed, 2 insertions, 8 deletions
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 |