David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.1467.mcz
==================== Summary ====================
Name: Kernel-dtl.1467
Author: dtl
Time: 6 May 2022, 7:49:49.633221 pm
UUID: 801fcdf4-9dc9-4dfe-968e-3445984c492d
Ancestors: Kernel-nice.1466
Access methods to query primitiveMultipleBytecodeSetsActive in the VM, and primitiveBytecodeSetsAvailable to query the VM for known supported bytecode sets.
Background: In current practice, multiple bytecode sets active indicates that a Sista bytecode set is being used in the image (CompiledCode useSistaBytecodeSet: true). When set true in the VM, the image format number is updated accordingly in the saved image file (e.g. image format 68533 rather than 68021).
For a current VM: CompiledCode byteCodeSetsKnownToTheVM ==> #('EncoderForV3' 'EncoderForV3PlusClosures' 'EncoderForSistaV1')
For the expected (but hopefully rare) case of an image format 68533 file that cannot be read by an older VM due to unrecognized image format number, the image file can be patched back to 68021 using a utility method from package ImageFormat from http://source.squeak.org/VMMaker:
ImageFormat class>>clearSistaBit: imageFileName
"Rescue utility. If an image file was written by a VM that understands the new
image format numbers for multiple bytecode support, but no local VM is available
to run that image, this method can be used to rewrite the image format number
to an older format number that is likely to readable."
=============== Diff against Kernel-nice.1466 ===============
Item was added:
+ ----- Method: CompiledCode class>>byteCodeSetsKnownToTheVM (in category 'method encoding') -----
+ byteCodeSetsKnownToTheVM
+ "Answer the encoder names for the bytecode sets reported to be supported
+ by the virtual machine. Informational, failure indicates only that the VM does
+ not support the primitive query."
+
+ "CompiledCode byteCodeSetsKnownToTheVM"
+
+ <primitive: 'primitiveBytecodeSetsAvailable'>
+ ^ self primitiveFailed
+ !
Item was added:
+ ----- Method: CompiledCode class>>multipleBytecodeSetsActive (in category 'method encoding') -----
+ multipleBytecodeSetsActive
+ "Answer if the VM supports multiple bytecode sets, typically the Sista bytecodes
+ in addition to the traditional V3 bytecode set."
+
+ <primitive: 'primitiveMultipleBytecodeSetsActive'>
+ !
Nicolas Cellier uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-nice.159.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-nice.159
Author: nice
Time: 6 May 2022, 4:53:19.127501 pm
UUID: dbbb7a90-f344-5e46-b97f-b26f5cbfba4c
Ancestors: ToolBuilder-Kernel-mt.158
Correct frenchism desarmHandler -> disarmHandler (companion to Kernel-ct.1406)
=============== Diff against ToolBuilder-Kernel-mt.158 ===============
Item was changed:
----- Method: ProgressInitiationException>>sendNotificationsTo: (in category 'handling') -----
sendNotificationsTo: aNewBlock
"Resume execution using aNewBlock as workBlock value.
Note that the execution is resumed in signalContext (or outerContext).
This is done so that inner exception handlers be active during workBlock execution.
However, our own handlerContext should be deactivated, unless explicitely rearmed."
| mustDeactivateHandler |
mustDeactivateHandler := handlerContext notNil and: [handlerContext isHandlerActive not].
mustDeactivateHandler
ifTrue:
["The handlerContext is de-activated during handleSignal:
But it will be reactivated during unwinding when we will resumeEvaluating:
That's unwanted, we don't generally want to rearm the handler during workBlock evaluation.
Hence we have to deactivate it again inside the deferred block."
self resumeEvaluating:
[handlerContext deactivateHandler.
[workBlock value: [ :barVal |
aNewBlock value: minVal value: maxVal value: barVal]]
ensure: [handlerContext reactivateHandler]]]
ifFalse:
["If the handler is active at this step, then it must have been rearmed
with a #rearmHandlerDuring:
It's thus intentional to keep the handler active during workBlock evaluation
+ But the ensure: [self disarmHandler] will be evaluated during unwinding when we will resumeEvaluating:
- But the ensure: [self desarmHandler] will be evaluated during unwinding when we will resumeEvaluating:
It is thus necessary to rearm again inside the evaluated block"
self resumeEvaluating:
[self rearmHandlerDuring:
[workBlock value: [ :barVal |
aNewBlock value: minVal value: maxVal value: barVal]]]]!
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1989.mcz
==================== Summary ====================
Name: Morphic-nice.1989
Author: nice
Time: 6 May 2022, 4:49:51.184501 pm
UUID: 1e4a16d9-8bdc-c04f-9e62-a08df254d7bc
Ancestors: Morphic-ct.1988
Make a block cleaner in dispatchMouseDown:with:
=============== Diff against Morphic-ct.1988 ===============
Item was changed:
----- Method: MorphicEventDispatcher>>dispatchMouseDown:with: (in category 'specific') -----
dispatchMouseDown: anEvent with: aMorph
"Find the appropriate receiver for the event and let it handle it. When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is."
| handler lastHandler |
"Try to get out quickly"
anEvent wasIgnored ifTrue: [^anEvent "propagate the ignored event"].
(aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected].
"In case the mouse wasn't even in the receiver"
lastHandler := anEvent handler.
"Negotiate and install the actual handler."
handler := aMorph handlerForMouseDown: anEvent.
handler ifNotNil: [anEvent handler: handler].
+ ^[ self
- [^ self
dispatchEvent: anEvent
withHandler: handler
withMorph: aMorph
] ensure: [
anEvent handler: lastHandler. "good style"].!
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jar.476.mcz
==================== Summary ====================
Name: Tests-jar.476
Author: jar
Time: 29 January 2022, 8:45:33.967173 pm
UUID: baedfdf3-299a-bf46-8ab5-61057c90b99c
Ancestors: Tests-ct.475
fix an error in my previous contribution; I used a class instead of an instance of an exception as an argument to #resignalAs:
The test worked because current implementation of #resignalAs allows it but using a class instead of an instance is not consistent with ANSI specification.
=============== Diff against Tests-ct.475 ===============
Item was changed:
----- Method: ExceptionTester>>doubleOuterResignalAsTest (in category 'tests') -----
doubleOuterResignalAsTest
"ExceptionTester new doubleOuterResignalAsTest"
[[self doSomething.
MyResumableTestError signal.
self doYetAnotherThing]
on: MyResumableTestError
do: [:ex | ex outer. self doSomethingExceptional].
self doSomethingElse]
on: MyResumableTestError
+ do: [:ex | ex resignalAs: MyTestNotification new]
- do: [:ex | ex resignalAs: MyTestNotification]
!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1466.mcz
==================== Summary ====================
Name: Kernel-nice.1466
Author: nice
Time: 6 May 2022, 4:43:35.743501 pm
UUID: fe23d949-2d52-9849-a257-9af7abec221e
Ancestors: Kernel-nice.1465, Kernel-ct.1406
Merge Kernel-ct.1406 (correct frenchism desarmHandler -> disarmHandler)
=============== Diff against Kernel-nice.1465 ===============
Item was removed:
- ----- Method: Context>>desarmHandler (in category 'private-exceptions') -----
- desarmHandler
- "Private - sent to exception handler context only (on:do:)"
-
- stackp >= 4 ifTrue: [self tempAt: 4 put: false] "this is temporary handlerRearmed in #on:do:"!
Item was added:
+ ----- Method: Context>>disarmHandler (in category 'private-exceptions') -----
+ disarmHandler
+ "Private - sent to exception handler context only (on:do:)"
+
+ stackp >= 4 ifTrue: [self tempAt: 4 put: false] "this is temporary handlerRearmed in #on:do:"!
Item was changed:
----- Method: Context>>rearmHandlerDuring: (in category 'private-exceptions') -----
rearmHandlerDuring: aBlock
"Sent to handler (on:do:) contexts only. Makes me re-entrant for the duration of aBlock. Only works in a closure-enabled image"
^ [self rearmHandler. aBlock value]
+ ensure: [self disarmHandler]!
- ensure: [self desarmHandler]!
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.487.mcz
==================== Summary ====================
Name: Tests-mt.487
Author: mt
Time: 6 May 2022, 4:43:31.842704 pm
UUID: ac02ca98-0f0d-1b4e-8ae5-250e7bd9ac42
Ancestors: Tests-mt.486, Tests-jar.476
Merges Tests-jar.476
Fix an error in my previous contribution; I used a class instead of an instance of an exception as an argument to #resignalAs:.
=============== Diff against Tests-mt.486 ===============
Item was changed:
----- Method: ExceptionTester>>doubleOuterResignalAsTest (in category 'tests') -----
doubleOuterResignalAsTest
"ExceptionTester new doubleOuterResignalAsTest"
[[self doSomething.
MyResumableTestError signal.
self doYetAnotherThing]
on: MyResumableTestError
do: [:ex | ex outer. self doSomethingExceptional].
self doSomethingElse]
on: MyResumableTestError
+ do: [:ex | ex resignalAs: MyTestNotification new]
- do: [:ex | ex resignalAs: MyTestNotification]
!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ct.1406.mcz
==================== Summary ====================
Name: Kernel-ct.1406
Author: ct
Time: 15 May 2021, 9:53:50.156138 pm
UUID: 8d0523c3-281e-7c44-bff5-8d5c69646c62
Ancestors: Kernel-nice.1402
Fixes a typo in Context >> #d?sarmHandler. Normally I would not have spammed the inbox with minor changes like this one, but me as a non-native speaker was actually confused about the term "desarm" before consulting a dictionary. :-)
=============== Diff against Kernel-nice.1402 ===============
Item was removed:
- ----- Method: Context>>desarmHandler (in category 'private-exceptions') -----
- desarmHandler
- "Private - sent to exception handler context only (on:do:)"
-
- stackp >= 4 ifTrue: [self tempAt: 4 put: false] "this is temporary handlerRearmed in #on:do:"!
Item was added:
+ ----- Method: Context>>disarmHandler (in category 'private-exceptions') -----
+ disarmHandler
+ "Private - sent to exception handler context only (on:do:)"
+
+ stackp >= 4 ifTrue: [self tempAt: 4 put: false] "this is temporary handlerRearmed in #on:do:"!
Item was changed:
----- Method: Context>>rearmHandlerDuring: (in category 'private-exceptions') -----
rearmHandlerDuring: aBlock
"Sent to handler (on:do:) contexts only. Makes me re-entrant for the duration of aBlock. Only works in a closure-enabled image"
^ [self rearmHandler. aBlock value]
+ ensure: [self disarmHandler]!
- ensure: [self desarmHandler]!