We merged 18 PRs
Lots of improvements related to BlockClosures this week.
First some helper methods on the AST:
Some improvements for isClean:
Compiler support for ConstantBlockClosure:
Compiler support for full block without outer context:
Quick return for Blocks:
AST: add a recursive #hasNonLocalReturn and #isConstant #11882
https://github.com/pharo-project/pharo/pull/11882
add #numArgs to RBBlockNode #11902
https://github.com/pharo-project/pharo/pull/11902
CleanBlock cleanup code: there should be no receiver ivar #11884
https://github.com/pharo-project/pharo/pull/11884
11881-RBBlockNodeisClean-takes-every-optimized-block-to-be-not-clean #11890
https://github.com/pharo-project/pharo/pull/11890
1883-CleanBlockChecker-does-not-recurse-into-the-blocks #11900
https://github.com/pharo-project/pharo/pull/11900
ConstantBlockClosure: active when compiling with clean blocks enabled #11894
https://github.com/pharo-project/pharo/pull/11894
CompiledBlocks: compile quick returns #11907
https://github.com/pharo-project/pharo/pull/11907
IRBuilder: add support for outerContext flag for Closure creation #11905
https://github.com/pharo-project/pharo/pull/11905
11911-Compiler-add-compiler-option-for-outerContextNeeded #11917
https://github.com/pharo-project/pharo/pull/11917
Register-as-basicInspector #431
https://github.com/pharo-spec/NewTools/pull/431
11803 return value of inspect should be the receiver and not a sp window presenter #11886
https://github.com/pharo-project/pharo/pull/11886
Fixes #429, VersionBrowser: left pane empty #430
https://github.com/pharo-spec/NewTools/pull/430
Turn off ReLongMethodsRule for test methods #11892
https://github.com/pharo-project/pharo/pull/11892
ClassParser: Implement #asSlot to return a correct Slot instances for complex slots #11898
https://github.com/pharo-project/pharo/pull/11898
Fixes #11802 - Adds full consistency checks to class Time #11891
https://github.com/pharo-project/pharo/pull/11891
Fixing to correctly get the VM for running the tests #11897
https://github.com/pharo-project/pharo/pull/11897
Fixes #429, VersionBrowser: left pane empty #430
https://github.com/pharo-spec/NewTools/pull/430
The attention to detail on these cleanups to make everything symmetrical is very nice - cool work.
Tim
On Fri, 18 Nov 2022, at 7:15 AM, Marcus Denker wrote:
We merged 18 PRs
Lots of improvements related to BlockClosures this week.
First some helper methods on the AST:
Some improvements for isClean:
Compiler support for ConstantBlockClosure:
Compiler support for full block without outer context:
Quick return for Blocks:
AST: add a recursive #hasNonLocalReturn and #isConstant #11882
https://github.com/pharo-project/pharo/pull/11882
add #numArgs to RBBlockNode #11902
https://github.com/pharo-project/pharo/pull/11902
CleanBlock cleanup code: there should be no receiver ivar #11884
https://github.com/pharo-project/pharo/pull/11884
11881-RBBlockNodeisClean-takes-every-optimized-block-to-be-not-clean #11890
https://github.com/pharo-project/pharo/pull/11890
1883-CleanBlockChecker-does-not-recurse-into-the-blocks #11900
https://github.com/pharo-project/pharo/pull/11900
ConstantBlockClosure: active when compiling with clean blocks enabled #11894
https://github.com/pharo-project/pharo/pull/11894
CompiledBlocks: compile quick returns #11907
https://github.com/pharo-project/pharo/pull/11907
IRBuilder: add support for outerContext flag for Closure creation #11905
https://github.com/pharo-project/pharo/pull/11905
11911-Compiler-add-compiler-option-for-outerContextNeeded #11917
https://github.com/pharo-project/pharo/pull/11917
Register-as-basicInspector #431
https://github.com/pharo-spec/NewTools/pull/431
11803 return value of inspect should be the receiver and not a sp
window presenter #11886
https://github.com/pharo-project/pharo/pull/11886
Fixes #429, VersionBrowser: left pane empty #430
https://github.com/pharo-spec/NewTools/pull/430
Turn off ReLongMethodsRule for test methods #11892
https://github.com/pharo-project/pharo/pull/11892
ClassParser: Implement #asSlot to return a correct Slot instances for
complex slots #11898
https://github.com/pharo-project/pharo/pull/11898
Fixes #11802 - Adds full consistency checks to class Time #11891
https://github.com/pharo-project/pharo/pull/11891
Fixing to correctly get the VM for running the tests #11897
https://github.com/pharo-project/pharo/pull/11897
Fixes #429, VersionBrowser: left pane empty #430
https://github.com/pharo-spec/NewTools/pull/430
On 18 Nov 2022, at 08:15, Marcus Denker marcus.denker@inria.fr wrote:
We merged 18 PRs
Lots of improvements related to BlockClosures this week.
First some helper methods on the AST:
Some numbers:
"there are lots of blocks"
allBlocks := Smalltalk globals allMethods flatCollect: [:meth | meth ast blockNodes ].
allBlocks size. "100140"
"but many are compiled inline (eg argunments of #ifTrue:)"
currentFullBlocks := allBlocks select: [:blockNode | blockNode isInlined not].
currentFullBlocks size. "45193"
"What we could compile as CleanBlockClosure"
cleanBlocks := currentFullBlocks select: [:blockNode | blockNode isClean].
cleanBlocks size. "11090"
"many clean blocks are actually constant"
constantBlocks := cleanBlocks select: [:blockNode | blockNode isConstant].
constantBlocks size. "3200"
"FullBlocks that need the outerContext to return"
fullBocksWithReturn := currentFullBlocks select: [ :each | each hasNonLocalReturn ].
fullBocksWithReturn size “3816”
We can inspect the collections and then use the inspector to browse the code (with the block
that you look at hightlighted), to get a feel where these are used, e.g. for constant:
Wow - thats even neater... all done with our normal tools - on the fly. So cool. Not sure many environments/languages can reason about things in this way.
Worthy of a blog post for the wider world I would say - as this kind of stuff should be on more people's radars.
Thanks again for all this kind of work. It would be so easy to just continue to think the job was done 20 years ago, where in fact we've only scratched the surface as our understanding of effective software development has improved.
Tim
On Fri, 18 Nov 2022, at 10:19 AM, Marcus Denker wrote:
On 18 Nov 2022, at 08:15, Marcus Denker marcus.denker@inria.fr wrote:
We merged 18 PRs
Lots of improvements related to BlockClosures this week.
First some helper methods on the AST:
Some numbers:
"there are lots of blocks"
allBlocks := Smalltalk globals allMethods flatCollect: [:meth | meth ast blockNodes ].
allBlocks size. "100140"
"but many are compiled inline (eg argunments of #ifTrue:)"
currentFullBlocks := allBlocks select: [:blockNode | blockNode isInlined not].
currentFullBlocks size. "45193"
"What we could compile as CleanBlockClosure"
cleanBlocks := currentFullBlocks select: [:blockNode | blockNode isClean].
cleanBlocks size. "11090"
"many clean blocks are actually constant"
constantBlocks := cleanBlocks select: [:blockNode | blockNode isConstant].
constantBlocks size. "3200"
"FullBlocks that need the outerContext to return"
fullBocksWithReturn := currentFullBlocks select: [ :each | each hasNonLocalReturn ].
fullBocksWithReturn size “3816”
We can inspect the collections and then use the inspector to browse the code (with the block
that you look at hightlighted), to get a feel where these are used, e.g. for constant:
Hi
T
On 18 Nov 2022, at 12:09, Tim Mackinnon tim@testit.works wrote:
Wow - thats even neater... all done with our normal tools - on the fly. So cool. Not sure many environments/languages can reason about things in this way.
Worthy of a blog post for the wider world I would say - as this kind of stuff should be on more people's radars.
Yes, I will do that.
Thanks again for all this kind of work. It would be so easy to just continue to think the job was done 20 years ago, where in fact we've only scratched the surface as our understanding of effective software development has improved.
Thanks. Sometimes I think my problem was that when I discovered Smalltalk I did not see perfection in it but an interesting starting point…
Marcus