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
YJIT: Inline simple getlocal+leave iseqs #10360
Conversation
646a6f2
to
d322d8b
Compare
@@ -6774,6 +6779,17 @@ fn iseq_get_return_value(iseq: IseqPtr, captured_opnd: Option<Opnd>) -> Option<I | |||
return None; | |||
} | |||
match first_insn { | |||
YARVINSN_getlocal_WC_0 => { | |||
// Only accept simple positional only cases for both the caller and the callee. | |||
// Reject block ISEQs to avoid autosplat and other block parameter complications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rejecting the captured_opnd.is_some()
case only impacts yield
. Is this not a problem for block.call
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a problem for block.call
, but we essentially do a manual fallback with rb_optimized_call() for those cases 😅 All the block setup code check captured_opnd
.
I think possibly you mean def self.let(x, type)
x
end anyways, neat PR! |
This mainly targets things like `T.unsafe()` from Sorbet, which is just an identity function at runtime and only a hint for the static checker. Only deal with simple caller and callees (no keywords and splat etc.). Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com>
d322d8b
to
57219b5
Compare
We do yes. |
This mainly targets things like
T.let()
from Sorbet, which is just anidentity function at runtime and only a hint for the static checker.
Only deal with simple caller and callees (no keywords and splat etc.).