diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-11-15 10:52:39 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-11-21 09:58:53 -0500 |
commit | 648927d71bde5df02a0490f5f45bb7fcde913376 (patch) | |
tree | cb89cd7440e51d374e3e6346e1a0d72514532a3c /internal | |
parent | 612aa5c24a7c249867bbcd7d6567012aa6a7f4b9 (diff) | |
download | ruby-648927d71bde5df02a0490f5f45bb7fcde913376.tar.gz |
Refactor obj_ivar_set and vm_setivar
obj_ivar_set and vm_setivar_slowpath is essentially doing the same thing,
but the code is duplicated and not quite implemented in the same way,
which could cause bugs. This commit refactors vm_setivar_slowpath to use
obj_ivar_set.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/variable.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/variable.h b/internal/variable.h index 553e87c4a8..e59a0f1924 100644 --- a/internal/variable.h +++ b/internal/variable.h @@ -57,6 +57,7 @@ void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID); rb_shape_t * rb_grow_iv_list(VALUE obj); void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize); struct gen_ivtbl * rb_ensure_generic_iv_list_size(VALUE obj, uint32_t newsize); +attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val); MJIT_SYMBOL_EXPORT_END static inline bool |