Skip to content
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

[PRISM] Fix keywords arguments in IndexAndWriteNode #9641

Merged
merged 1 commit into from Jan 22, 2024

Conversation

peterzhu2118
Copy link
Member

@@ -951,6 +951,11 @@ pm_compile_index_write_nodes_add_send(bool popped, LINK_ANCHOR *const ret, rb_is
}
ADD_SEND_WITH_FLAG(ret, &dummy_line_node, idASET, argc, INT2FIX(flag));
}
else if (keywords && keywords->keyword_len) {
ADD_INSN1(ret, &dummy_line_node, opt_reverse, INT2FIX(keywords->keyword_len + block_offset + 1));
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this fall back if optimizations are turned off?

Copy link
Member Author

Choose a reason for hiding this comment

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

opt_reverse is used to reverse the stack elements and it's used even when optimizations are turned off.

@peterzhu2118 peterzhu2118 merged commit a7af34f into ruby:master Jan 22, 2024
96 of 97 checks passed
@peterzhu2118 peterzhu2118 deleted the prism-and-write-keyword branch January 22, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants