You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: