Skip to content

More refactoring of block#6614

Merged
enebo merged 7 commits intojruby:masterfrom
enebo:blocky
Mar 24, 2021
Merged

More refactoring of block#6614
enebo merged 7 commits intojruby:masterfrom
enebo:blocky

Conversation

@enebo
Copy link
Member

@enebo enebo commented Mar 12, 2021

Primary motivation was eliminating any NORMAL block types from making it to BlockBody.prepareArgumentForCall. This bled over into also not calling from BlockBody back to RubyProc.

All yields now convert their arguments in two paths. They all happen at the same level. All calls will use the same logic and no longer have to contend with NORMAL sneaking in.

Open work which could continue is I indirected BlockCallbackImpl to wrap a Proc. So I added a level of indirection. I find this type and RubyYielder to be another area to reexamine at a later point. We play a lot of games here to reduce overhead but it is really hard to grok it.

enebo added 7 commits March 6, 2021 09:41
This should be zero sum.  It also went to some pains to ensure no
NORMAL type is passed through places which should be PROC.
We already know it will not be a direct call and we know call it will
make.  This is also more of a lower call than calling back into another
top-level yield.
@enebo enebo added this to the JRuby 9.3.0.0 milestone Mar 24, 2021
@enebo enebo merged commit 7737570 into jruby:master Mar 24, 2021
@enebo enebo deleted the blocky branch March 4, 2025 18: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.

1 participant