Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ZJIT: Add codegen for ArrayMax#16411

Merged
tekknolagi merged 3 commits into
ruby:masterfrom
tekknolagi:mb-array-max-codegen
Mar 20, 2026
Merged

ZJIT: Add codegen for ArrayMax#16411
tekknolagi merged 3 commits into
ruby:masterfrom
tekknolagi:mb-array-max-codegen

Conversation

@tekknolagi
Copy link
Copy Markdown
Contributor

Implements codegen for ArrayMax (opt_newarray_max) by calling the rb_vm_opt_newarray_max VM helper, following the same pattern as ArrayHash and ArrayInclude.

@tekknolagi tekknolagi marked this pull request as ready for review March 17, 2026 00:26
@matzbot matzbot requested a review from a team March 17, 2026 00:26
Comment thread zjit/src/codegen.rs Outdated
Copy link
Copy Markdown
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@k0kubun
Copy link
Copy Markdown
Member

k0kubun commented Mar 17, 2026

just confirmed that we have test_opt_newarray_send_max in codegen_tests that tests the behavior of the compiled code. I guess we lost the assert_compiles vs assert_runs distinction when we converted tests to Rust, so I'll have it fixed to resurrect the capability.

@tekknolagi
Copy link
Copy Markdown
Contributor Author

I think it is because it still compiles but leads to an immediate SideExit at that opcode

@tekknolagi tekknolagi force-pushed the mb-array-max-codegen branch from 3c8d78f to 24df1af Compare March 20, 2026 23:06
@tekknolagi tekknolagi enabled auto-merge (squash) March 20, 2026 23:06
@tekknolagi tekknolagi merged commit f55d9e1 into ruby:master Mar 20, 2026
92 checks passed
@tekknolagi tekknolagi deleted the mb-array-max-codegen branch March 20, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants