The inspectors for blocks are now a bit improved:
Currently, we compile every non-optimized block to a full block that created by a bytecode from a CompiledBlock (which
itself is stored as a literal).
inspect “CompiledBlock allInstances” to see the new inspector:
A nice way to play with these is:
CompilationContext optionConstantBlockClosure: true.
some 2500 of the blocks are now compiled statically.
The inspector shows the same (home method with highlight, IR, AST)
But we can do even better:
CompilationContext optionCleanBlockClosure: true.
Another 7500 blocks can be statically compiled, inspect
These are not yet the default, as we have to carefully analyse the places where we now assume that blocks know the outerContext
and receiver. (in the example above you see one of these: Announcements…).
You can follow these issues to see what still needs to be done:
[Meta] Steps needed for ConstantBlocks #11933
[Meta] Steps needed for CleanBlocks #11195