Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1021.mcz
==================== Summary ====================
Name: Tools-ct.1021
Author: ct
Time: 3 January 2021, 8:44:07.705149 pm
UUID: de36bf14-60b2-d745-9ade-df88c56b645c
Ancestors: Tools-mt.1019
Hotfix for fatal error in MVC projects when switching from an explorer to an inspector.
Regression since Tools-mt.998 (elimination of 'Active' variables): [Project current world] now consistently answers a ControlManager instance in an MVC project rather than nil. Unfortunately, ControlManager does not implement the stepping protocol like Morphic does ...
For now, let ObjectExplorer >> #world only answer actually steppable, i.e. morphic worlds, so stepping is disabled safely in MVC. Note that, however, at a later point we might want to talk about stepping support for MVC again ... maybe? The Process Browser already supports it. :-)
=============== Diff against Tools-mt.1019 ===============
Item was changed:
----- Method: ObjectExplorer>>release (in category 'monitoring') -----
release
+ self world ifNotNil: [ :world | world stopStepping: self selector: #step ].
- self world ifNotNil: [ self world stopStepping: self selector: #step ].
super release.!
Item was changed:
----- Method: ObjectExplorer>>stopMonitoring (in category 'monitoring') -----
stopMonitoring
monitorList := nil.
+ self world ifNotNil: [ :world | world stopStepping: self selector: #step].!
- self world stopStepping: self selector: #step!
Item was changed:
----- Method: ObjectExplorer>>world (in category 'monitoring') -----
world
+ | project |
+ project := Project current.
+ project isMorphic ifFalse: [^ nil].
+ ^ project world!
- ^ Project current world!
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.1021.mcz
==================== Summary ====================
Name: Tools-ct.1021
Author: ct
Time: 3 January 2021, 8:44:07.705149 pm
UUID: de36bf14-60b2-d745-9ade-df88c56b645c
Ancestors: Tools-mt.1019
Hotfix for fatal error in MVC projects when switching from an explorer to an inspector.
Regression since Tools-mt.998 (elimination of 'Active' variables): [Project current world] now consistently answers a ControlManager instance in an MVC project rather than nil. Unfortunately, ControlManager does not implement the stepping protocol like Morphic does ...
For now, let ObjectExplorer >> #world only answer actually steppable, i.e. morphic worlds, so stepping is disabled safely in MVC. Note that, however, at a later point we might want to talk about stepping support for MVC again ... maybe? The Process Browser already supports it. :-)
=============== Diff against Tools-mt.1019 ===============
Item was changed:
----- Method: ObjectExplorer>>release (in category 'monitoring') -----
release
+ self world ifNotNil: [ :world | world stopStepping: self selector: #step ].
- self world ifNotNil: [ self world stopStepping: self selector: #step ].
super release.!
Item was changed:
----- Method: ObjectExplorer>>stopMonitoring (in category 'monitoring') -----
stopMonitoring
monitorList := nil.
+ self world ifNotNil: [ :world | world stopStepping: self selector: #step].!
- self world stopStepping: self selector: #step!
Item was changed:
----- Method: ObjectExplorer>>world (in category 'monitoring') -----
world
+ | project |
+ project := Project current.
+ project isMorphic ifFalse: [^ nil].
+ ^ project world!
- ^ Project current world!
Hi Stefan,
> On Jan 2, 2021, at 6:18 AM, Stefan Marr via Squeak-dev <squeak-dev(a)lists.squeakfoundation.org> wrote:
>
> Hi Fabio:
>
>> On 2 Jan 2021, at 12:49, Fabio Niephaus <lists(a)fniephaus.com> wrote:
>> - In terms of performance, Sista makes almost no difference in TruffleSqueak.
>
> I would expect a benefit in terms of cold-code/interpreter performance.
> Do you see any benefits here?
There are two things here, one going on, the other not going on.
Sista, the adaptive optimizer architecture, includes Scorch, the image-level speculative compiler. Scorch is not (yet) in use. Clément is at Google and I don’t have the cycles to work on it. But Sista and Scorch require the SistaV1 bytecode set, which is a set capable of expressing normal Smalltalk and optimizations, and a set that lifts limits on maximum method size, supports separate method objects for closures, etc.
In Squeak we’ve moved to using the SistaV1 bytecode set but are of the order of six months to a year of engineering effort away from putting Sista the architecture into production. Doing so depends on a more productive development architecture, using the vm simulator and mirrors to allow Scorch to live alongside the simulator and optimize the image being simulated, not the current image, hence insulating the current image from bugs in Scorch.
This could be a really interesting PhD and I’d love to collaborate. But if the community simply waits for me to do the work it’ll be years before its complete. I have a very full plate.
Of course nothing will happen from Potsdam; they get their funding from Oracle, from Mario as I understand of, and right now that prevents competent people such as Fabio from working on Scorch itself and has them merely spectating, waiting to take advantage of something no one is putting resource into. It’s a frustrating and tragic situation. [I say tragic because my understanding of Shakespeare’s tragedies is that they are all driven by character]
Some creativity on behalf of us all seems necessary if this work isn’t going to go to waste. I’m extremely frustrated with this situation. If people can’t find a way of collaborating with me and only find ways of finding what are effectively disruptive efforts then the project will eventually wither and die.
I’m working for 3dIcc.com and we’re teetering on the brink. If we can get customers we can survive and I can become self-funding and may, in the remaining eight years to my seventieth birthday, have time to complete Sista; I certainly want to. But if the community could somehow find one or two people of Clément’s abilities to join me directly in the work, rather than simply spectating a body in a coma, then there is a good chance that Sista could be in production within a year or two.
Yes I’m angry and frustrated. You would be too.
>
>> which could greatly improve warmup.
>
> Less run-time work for optimizers is one possible benefit, but I would expect the interpreter itself to also shows some performance difference.
> For instance, I’d assume there’s less needed for run-time specialization in the Truffle interpreter, and the Truffle interpreter code being less polymorphic.
> Is that the case/measurable?
>
> Best regards
> Stefan
>
>
> --
> Stefan Marr
> School of Computing, University of Kent
> https://stefan-marr.de/research/
HNY!!
Eliot
_,,,^..^,,,_ (phone)
Hi all,
While digging through the implementation of FullBlockClosure with
Hernan, we were wondering about full closures that ignore their
outerContext. We noticed that the following method has two senders:
EncoderForSistaV1>>#genPushFullClosure:numCopied:receiverOnStack:ignoreOuterContext:
One of them seems to be the only one in use, and it's passing in false
as defaults for both receiverOnstack and ignoreOuterContext. The other
sender (BytecodeEncoder>>#sizePushFullClosure:numCopied:receiverOnStack:ignoreOuterContext:),
in turn, doesn't seem to have any further senders.
Unless we missed something, it looks like the outerContext will never
be ignored at the moment. Similarly, the receiver is never on the
stack. Is this something only Scorch can do or is this just "not yet
implemented"?
When can the outerContext be ignored? When does it make sense to pop
the receiver from the stack? And where can we find the latest version
of Scorch. Is it still the one at [1]?
Cheers,
Fabio
[1] https://github.com/clementbera/Scorch
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.392.mcz
==================== Summary ====================
Name: KernelTests-eem.392
Author: eem
Time: 1 January 2021, 12:17:42.043127 pm
UUID: c803a1d3-a439-4bac-8fc6-de85912285d9
Ancestors: KernelTests-eem.391
Add a FloatTest to compare all literal float contants in methods with those from a fresh compile, failing if any differ. Add a utility method to answer teh set of methods that cause the test to fail (FloatTest>>methodsMaybeContainingBrokenCompiledConstants).
=============== Diff against KernelTests-eem.391 ===============
Item was added:
+ ----- Method: FloatTest>>floatLiteralsIn: (in category 'private') -----
+ floatLiteralsIn: method
+ | floatLiterals |
+ floatLiterals := OrderedCollection new.
+ method allLiteralsDo:
+ [:lit| lit isFloat ifTrue: [floatLiterals addLast: lit]].
+ ^floatLiterals!
Item was added:
+ ----- Method: FloatTest>>methodContainsFloatLiteral: (in category 'private') -----
+ methodContainsFloatLiteral: method
+ method isQuick ifFalse:
+ [method allLiteralsDo:
+ [:lit| lit isFloat ifTrue: [^true]]].
+ ^false!
Item was added:
+ ----- Method: FloatTest>>methodsMaybeContainingBrokenCompiledConstants (in category 'private') -----
+ methodsMaybeContainingBrokenCompiledConstants
+ "Answer a set of all methods in the system which contain float constants that differ from those obtaiuned by
+ recompiling. These may indicate an old compiler issue, or indeed an issue with the current compiler. This is a
+ variant of testCompiledConstants used for collecting the set of methods rather than testing that none exist."
+ | identifiedPatients |
+ identifiedPatients := IdentitySet new.
+ CurrentReadOnlySourceFiles cacheDuring:
+ [self systemNavigation allSelectorsAndMethodsDo:
+ [:class :selector :method|
+ (self methodContainsFloatLiteral: method) ifTrue:
+ [| newMethodAndNode newLiterals oldLiterals |
+ newMethodAndNode := class compile: method getSource asString notifying: nil trailer: CompiledMethodTrailer empty ifFail: nil.
+ newLiterals := self floatLiteralsIn: newMethodAndNode method.
+ oldLiterals := self floatLiteralsIn: method.
+ "Convenience doit for recompiling broken methods:..."
+ "class recompile: selector"
+ newLiterals size = oldLiterals size
+ ifFalse: [identifiedPatients add: method]
+ ifTrue:
+ [newLiterals with: oldLiterals do:
+ [:new :old|
+ (new asIEEE64BitWord = old asIEEE64BitWord
+ or: [new isNaN and: old isNaN]) ifFalse:
+ [identifiedPatients add: method]]]]]].
+ ^identifiedPatients!
Item was added:
+ ----- Method: FloatTest>>testCompiledConstants (in category 'tests') -----
+ testCompiledConstants
+ "Test that any methods containing a floating point literal have been correctly compiled."
+ CurrentReadOnlySourceFiles cacheDuring:
+ [self systemNavigation allSelectorsAndMethodsDo:
+ [:class :selector :method|
+ (self methodContainsFloatLiteral: method) ifTrue:
+ [| newMethodAndNode newLiterals oldLiterals |
+ newMethodAndNode := class compile: method getSource asString notifying: nil trailer: CompiledMethodTrailer empty ifFail: nil.
+ newLiterals := self floatLiteralsIn: newMethodAndNode method.
+ oldLiterals := self floatLiteralsIn: method.
+ "Convenience doit for recompiling broken methods:..."
+ "class recompile: selector"
+ self assert: newLiterals size = oldLiterals size.
+ newLiterals with: oldLiterals do:
+ [:new :old|
+ self assert: (new asIEEE64BitWord = old asIEEE64BitWord
+ or: [new isNaN and: old isNaN])]]]]!
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.391.mcz
==================== Summary ====================
Name: KernelTests-eem.391
Author: eem
Time: 1 January 2021, 11:29:37.785901 am
UUID: 26cca588-616d-452b-9894-287b0f7e677e
Ancestors: KernelTests-eem.390
Oops. remember to include the meta part of the test.
=============== Diff against KernelTests-eem.390 ===============
Item was changed:
----- Method: FloatTest>>testClassConstants (in category 'tests - characterization') -----
testClassConstants
"Test all the class constants that are floats to check that they are valid.
Sometimes compiler bugs mean that the initialization method is incorrect, etc"
| expectedVariables unexpectedVariables "these two are for determining if this test is correct, not its results"
finiteVariables infiniteVariables nanVariables |
finiteVariables := #(Pi Halfpi Twopi ThreePi RadiansPerDegree Ln2 Ln10 Sqrt2 E Epsilon MaxVal MaxValLn NegativeZero).
infiniteVariables := #(Infinity NegativeInfinity).
nanVariables := #(NaN).
expectedVariables := Set new.
unexpectedVariables := Set new.
Float classPool keysAndValuesDo:
[:name :value|
value isFloat
ifTrue:
[(finiteVariables includes: name) ifTrue:
[expectedVariables add: name.
self assert: value isFinite.
self deny: value isInfinite.
self deny: value isNaN].
(infiniteVariables includes: name) ifTrue:
[expectedVariables add: name.
self deny: value isFinite.
self assert: value isInfinite.
self deny: value isNaN].
(nanVariables includes: name) ifTrue:
[expectedVariables add: name.
self deny: value isFinite.
self deny: value isInfinite.
self assert: value isNaN].
(expectedVariables includes: name) ifFalse:
[unexpectedVariables add: name]]
ifFalse:
+ [self deny: ((finiteVariables includes: name) or: [(infiniteVariables includes: name) or: [nanVariables includes: name]])]].
+ "Now check that test itself is working as intended..."
+ self assert: unexpectedVariables isEmpty.
+ self assert: expectedVariables = (finiteVariables, infiniteVariables, nanVariables) asSet!
- [self deny: ((finiteVariables includes: name) or: [(infiniteVariables includes: name) or: [nanVariables includes: name]])]]!
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.390.mcz
==================== Summary ====================
Name: KernelTests-eem.390
Author: eem
Time: 1 January 2021, 11:24:53.814816 am
UUID: 82abce52-6291-4621-8946-3575c4f4f9c3
Ancestors: KernelTests-ct.389
Add a test to check Float's constants. Add a utility (e.g for package prologs) to answer whether the test passes. At least in my image Float fmax had become NaN.
=============== Diff against KernelTests-ct.389 ===============
Item was added:
+ ----- Method: FloatTest class>>testClassConstantsPasses (in category 'utilities') -----
+ testClassConstantsPasses
+ "Answer if testClassConstants passes. This can be used in e.g. the Kernel Package prolog
+ to test if Float initialize needs to be run."
+ [self new testClassConstants]
+ on: TestResult failure
+ do: [:ex| ^false].
+ ^true!
Item was added:
+ ----- Method: FloatTest>>testClassConstants (in category 'tests - characterization') -----
+ testClassConstants
+
+ "Test all the class constants that are floats to check that they are valid.
+ Sometimes compiler bugs mean that the initialization method is incorrect, etc"
+ | expectedVariables unexpectedVariables "these two are for determining if this test is correct, not its results"
+ finiteVariables infiniteVariables nanVariables |
+ finiteVariables := #(Pi Halfpi Twopi ThreePi RadiansPerDegree Ln2 Ln10 Sqrt2 E Epsilon MaxVal MaxValLn NegativeZero).
+ infiniteVariables := #(Infinity NegativeInfinity).
+ nanVariables := #(NaN).
+ expectedVariables := Set new.
+ unexpectedVariables := Set new.
+ Float classPool keysAndValuesDo:
+ [:name :value|
+ value isFloat
+ ifTrue:
+ [(finiteVariables includes: name) ifTrue:
+ [expectedVariables add: name.
+ self assert: value isFinite.
+ self deny: value isInfinite.
+ self deny: value isNaN].
+ (infiniteVariables includes: name) ifTrue:
+ [expectedVariables add: name.
+ self deny: value isFinite.
+ self assert: value isInfinite.
+ self deny: value isNaN].
+ (nanVariables includes: name) ifTrue:
+ [expectedVariables add: name.
+ self deny: value isFinite.
+ self deny: value isInfinite.
+ self assert: value isNaN].
+ (expectedVariables includes: name) ifFalse:
+ [unexpectedVariables add: name]]
+ ifFalse:
+ [self deny: ((finiteVariables includes: name) or: [(infiniteVariables includes: name) or: [nanVariables includes: name]])]]!