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

Interpreter: cache methods with captured block #12285

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

asterite
Copy link
Member

Fixes #12276

The interpreter caches method instantiations. However, it doesn't (can't) cache them if a method has an inlined-block. But a check to see that the block wasn't actually captured was missing. So this fixes that, and it might also improve the performance (previously every call to a method that captured a block was re-compiled.) It's probably unnoticeable, not sure (I didn't benchmark anything)

@straight-shoota straight-shoota added this to the 1.6.0 milestone Jul 17, 2022
@asterite asterite merged commit 62e3139 into master Jul 18, 2022
@asterite asterite deleted the interpreter/cache-method-with-captured-block branch July 18, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interpreter: Stack overflow (e.g., infinite or very deep recursion) with Crest::Request#execute
2 participants