Ruby 3.2.3p157 (2024-01-18 revision 52bb2ac0a6971d0391efa2275f7a66bff319087c)
|
Macros | |
#define | RB_OBJ_WRITE(old, slot, young) RBIMPL_CAST(rb_obj_write((VALUE)(old), (VALUE *)(slot), (VALUE)(young), __FILE__, __LINE__)) |
Declaration of a "back" pointer. | |
#define | RB_OBJ_WRITTEN(old, oldv, young) RBIMPL_CAST(rb_obj_written((VALUE)(old), (VALUE)(oldv), (VALUE)(young), __FILE__, __LINE__)) |
Identical to RB_OBJ_WRITE(), except it doesn't write any values, but only a WB declaration. | |
#define RB_OBJ_WRITE | ( | old, | |
slot, | |||
young ) RBIMPL_CAST(rb_obj_write((VALUE)(old), (VALUE *)(slot), (VALUE)(young), __FILE__, __LINE__)) |
Declaration of a "back" pointer.
This is a write barrier for new reference from "old" generation to "young" generation. It writes young
into *slot
, which is a pointer inside of old
.
[in] | old | An old object. |
[in] | slot | A pointer inside of old . |
[out] | young | A young object. |
Definition at line 220 of file rgengc.h.
Referenced by class_alloc(), RARRAY_ASET(), rb_alias(), rb_ary_push(), rb_enc_reg_new(), rb_hash_set_ifnone(), rb_ractor_stderr_set(), rb_ractor_stdin_set(), and rb_ractor_stdout_set().
#define RB_OBJ_WRITTEN | ( | old, | |
oldv, | |||
young ) RBIMPL_CAST(rb_obj_written((VALUE)(old), (VALUE)(oldv), (VALUE)(young), __FILE__, __LINE__)) |
Identical to RB_OBJ_WRITE(), except it doesn't write any values, but only a WB declaration.
oldv
is replaced value with b
(not used in current Ruby).
[in] | old | An old object. |
[in] | oldv | An object previously stored inside of old . |
[out] | young | A young object. |
Definition at line 232 of file rgengc.h.
Referenced by rb_copy_generic_ivar().