ZJIT: Optimize variadic cfunc Send calls into CCallVariadic#14898
ZJIT: Optimize variadic cfunc Send calls into CCallVariadic#14898st0012 merged 1 commit intoruby:masterfrom
Send calls into CCallVariadic#14898Conversation
zjit/src/hir.rs
Outdated
| @@ -12907,26 +12933,46 @@ mod opt_tests { | |||
There was a problem hiding this comment.
I decided to not use Array#index because it only considers either the passed arg, or the block. And if you pass both, it'd warn about block not being used.
This comment has been minimized.
This comment has been minimized.
5691488 to
00e7889
Compare
72f68f3 to
1186b4f
Compare
1186b4f to
555c8b2
Compare
555c8b2 to
835ac10
Compare
| gen_stack_overflow_check(jit, asm, state, state.stack_size()); | ||
|
|
||
| gen_prepare_non_leaf_call(jit, asm, state); | ||
| let args_with_recv_len = args.len() + 1; |
There was a problem hiding this comment.
The math here is different than gen_ccall_with_frame's because CCallWithFrame doesn't have recv field. I think this is confusing so I'll add a recv to it in a separate PR to make things consistent.
| let ci_flags = unsafe { vm_ci_flag(call_info) }; | ||
|
|
||
| // When seeing &block argument, fall back to dynamic dispatch for now | ||
| // TODO: Support block forwarding |
There was a problem hiding this comment.
iirc, @tekknolagi suggested before that TODOs have to be specifically targeted to ensure that they have someone to follow up on.
Like todo(aidenfoxivey): foo bar baz. I could be wrong though.
There was a problem hiding this comment.
Hmm this is different then I'm aware of. I can create an issue for it though.
…#14898) ZJIT: Optimize variadic cfunc Send calls into CCallVariadic
Similar to
SendWithoutBlock, this should eliminate most of the remaining unoptimized cfucc send.This PR removes
send_cfunc_variadic: 2,178,105 ( 4.6%)from Lobsters' send fallback reasons.Closes Shopify#825
LobstersBeforeDetails
LobstersAfterDetails