Skip to content

ZJIT: Annotate Primitive C expressions referencing Ruby local variables as reading/writing those locals #942

@tekknolagi

Description

@tekknolagi

Probably this looks like adding a bitset to rb_builtin_function in builtin.h, populating it with tool/mk_builtin_loader.rb, and then consuming it in the HIR builder to flush those locals before/after the builtin.

This is necessary to support ary_fetch_next which is used in the Ruby implementation of Array#each and others to make sure we atomically fetch both the next index and the next element of a collection without another thread mutating the object.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions