8000 Support `ivar_set` TracePoint event by st0012 · Pull Request #13369 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

Support ivar_set TracePoint event #13369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Trigger event for direct ivar assignment
  • Loading branch information
st0012 committed Jun 6, 2025
commit df0a6efbf0ef5a2e5cfef55f07ef9baa15ccfe8a
2 changes: 2 additions & 0 deletions vm_insnhelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,8 @@ vm_setinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, VALUE val, IVC i
attr_index_t index;
vm_ic_atomic_shape_and_index(ic, &dest_shape_id, &index);

EXEC_EVENT_HOOK(GET_EC(), RUBY_EVENT_IVAR_SET, obj, id, 0, 0, val);

if (UNLIKELY(UNDEF_P(vm_setivar(obj, id, val, dest_shape_id, index)))) {
switch (BUILTIN_TYPE(obj)) {
case T_OBJECT:
Expand Down
0