Skip to content

ZJIT: Support shared arrays in Array#[]= - #1117

Closed
efegokdemir wants to merge 3 commits into
Shopify:masterfrom
efegokdemir:efe/zjit-shared-array-set-1113
Closed

efegokdemir wants to merge 3 commits into
Shopify:masterfrom
efegokdemir:efe/zjit-shared-array-set-1113

Conversation

@efegokdemir

Copy link
Copy Markdown

ZJIT currently exits the inlined Array#[]= path when the receiver has shared storage. This calls rb_ary_modify only for shared arrays before the existing direct store and write barrier. The regression repeatedly writes through shared slices and checks the assignment result and copy-on-write preservation. make test/ruby/test_zjit_cli.rb passes (28 tests, 7,628 assertions). At n=8, the Benchmarks Game fannkuch-redux source did not hit this guard at the tested upstream SHA, so this change makes no benchmark improvement claim. Related to #1113.

@github-actions github-actions Bot added the jit label Nov 8, 2026
@tekknolagi

Copy link
Copy Markdown

Please file PRs to ruby/ruby.

@tekknolagi tekknolagi closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants