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:
parent
34fb7d7830
commit
dcb6e73306
1 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue