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

Compiler processes block argument in block bodies whether present or not #448

Closed
headius opened this issue Dec 15, 2012 · 1 comment
Closed

Comments

@headius
Copy link
Member

headius commented Dec 15, 2012

Currently, whether a block argument is needed or not, block bodies always process any incoming block. At a minimum, this causes a lot of boolean logic and some field acceses that are not usually necessary. At worst, it creates a Proc object for a given block when it's not needed.

The compiler needs to be modified not to do this. The logic to make the processBlockArgument call is in HeapBasedVariableCompiler and StackBasedVariableCompiler. There's some complications since we don't pass through information on whether the block is present, and all block-compiling logic assumes the block arg value will be pushed onto the stack for arg processing. Needs some retooling to work right.

@headius
Copy link
Member Author

headius commented Apr 5, 2016

This is not relevant under IR, and IR will not emit block-reification logic if there's no block argument.

@headius headius closed this as completed Apr 5, 2016
@headius headius added this to the Won't Fix milestone Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant