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

Skip to content

ZJIT: Parse opt_newarray_send into HIR #13242

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

Merged
merged 1 commit into from
May 2, 2025

Conversation

tekknolagi
Copy link
Contributor

This is a fast path that can avoid heap-allocating an intermediate Array
by using values on the stack.

This is a fast path that can avoid heap-allocating an intermediate Array
by using values on the stack.
@matzbot matzbot requested a review from a team May 2, 2025 19:28
@@ -816,6 +835,8 @@ impl Function {
ArrayDup { val , state } => ArrayDup { val: find!(*val), state: *state },
CCall { cfun, args, name, return_type } => CCall { cfun: *cfun, args: args.iter().map(|arg| find!(*arg)).collect(), name: *name, return_type: *return_type },
Defined { .. } => todo!("find(Defined)"),
NewArray { elements, state } => NewArray { elements: find_vec!(*elements), state: find!(*state) },
Copy link
Contributor Author

@tekknolagi tekknolagi May 2, 2025

Choose a reason for hiding this comment

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

This is an extant bug that I noticed and fixed on the way

{}
Insn::ArrayMax { elements, state }
| Insn::NewArray { elements, state } => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an extant bug that I noticed and fixed on the way

@k0kubun k0kubun enabled auto-merge (squash) May 2, 2025 19:56
@k0kubun k0kubun merged commit 23000c7 into ruby:master May 2, 2025
83 checks passed
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.

2 participants