What are full block closures?
Last updated at 9:29 pm UTC on 18 March 2018
Wed, Jan 3, 2018 at 6:44 PM
Reply-To: The general-purpose Squeak developers list
To: The general-purpose Squeak developers list
FullBlockClosure has a separate compiled method from its home; when in use CompiledMethod is the default class for methods; CompiledBlock is the default class for blocks. This gives faster block activation. It also means better support for clean blocks (blocks with no home) in that no outer context is needed. FullBlockClosure is important in Scorch, Clément's adaptive optimizer, in that deoptimization is much simplified. The old embedded block scheme where the block byte codes are included in the home method, and literals are shared between the two, is compact, but very difficult to interact with when the adaptive optimizer has to (de)optimize a single block or method activation, since the embedding of block byte codes means that the one method is serving several different scopes.
This year (2018) we should install the SistaV1 bytecode set and FullBlockClosures as the default in the Squeak image, hopefully in time for the next full release. In Pharo, Clément is already preparing to deploy the full Scorch/Sista optimizer. Hopefully I'll be able to port Scorch to Squeak later this year.