summaryrefslogtreecommitdiff
path: root/internal/variable.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-11-15 10:52:39 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-11-21 09:58:53 -0500
commit648927d71bde5df02a0490f5f45bb7fcde913376 (patch)
treecb89cd7440e51d374e3e6346e1a0d72514532a3c /internal/variable.h
parent612aa5c24a7c249867bbcd7d6567012aa6a7f4b9 (diff)
downloadruby-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/variable.h')
-rw-r--r--internal/variable.h1
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