Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jar.462.mcz
==================== Summary ====================
Name: Tests-jar.462
Author: jar
Time: 3 May 2021, 12:03:40.642808 pm
UUID: b9dfb879-cfe4-ea46-96c4-fa620bd984c8
Ancestors: Tests-jar.461
Fix indentation of #doubleOuterResignalAsTest. I hope it's right this time :)
=============== Diff against Tests-jar.461 ===============
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]
- do: [:ex | ex outer. self doSomethingExceptional]. self doSomethingElse]
- on: MyResumableTestError
- do: [:ex | ex resignalAs: MyTestNotification]
!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-jar.1400.mcz
==================== Summary ====================
Name: Kernel-jar.1400
Author: jar
Time: 4 May 2021, 10:35:06.700121 pm
UUID: 048df236-d26f-434e-964d-7707b8f2a9a8
Ancestors: Kernel-nice.1397
Fix a bug causing a cannot return error when re-signalling an already signalled exception. The fix makes re-signalling equivalent to sending #outer. Examples follow.
Discussion see http://forum.world.st/The-Inbox-Kernel-jar-1399-mcz-tp5129370p5129434.html
=============== Diff against Kernel-nice.1397 ===============
Item was changed:
----- Method: Exception>>signal (in category 'signaling') -----
signal
"Ask ContextHandlers in the sender chain to handle this signal. The default is to execute and return my defaultAction."
+ signalContext ifNotNil: [^self outer]. "re-signalling an already signalled exception is equivalent to sending #outer"
signalContext := thisContext contextTag.
^(thisContext nextHandlerContextForSignal: self) handleSignal: self!
Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:
http://source.squeak.org/FFI/FFI-Tools-mt.24.mcz
==================== Summary ====================
Name: FFI-Tools-mt.24
Author: mt
Time: 4 May 2021, 4:43:42.172881 pm
UUID: 411d91ef-c5dc-3643-b69f-8c9620d93201
Ancestors: FFI-Tools-mt.23
Make use of the byte-array writer to conveniently explore composite structures along with proper support for do-it. Both of which is fine for heap objects but challenging for handles that are byte arrays.
=============== Diff against FFI-Tools-mt.23 ===============
Item was changed:
----- Method: ExternalObjectHandleWrapper>>objectString (in category 'accessing') -----
objectString
+ | label handle |
+ label := super objectString.
+ handle := self getHandle.
- self getHandle class == ExternalAddress ifTrue: [^ super objectString].
- self getHandle class == ByteArray ifTrue: [^ super objectString].
+ handle isExternalAddress ifTrue: [^ label].
+ handle isInternalMemory ifTrue: [
+ ^ (thisContext objectClass: handle) == ByteArrayReadWriter
+ ifFalse: [label]
+ ifTrue: [ | begin end |
+ label :=(thisContext object: handle instVarAt: 3) printString.
+ label := label copyFrom: 3 to: (label size - 1).
+ begin := (thisContext object: handle instVarAt: 1) + 1.
+ end := begin + (thisContext object: handle instVarAt: 2) - 1.
+ String streamContents: [:stream |
+ stream nextPutAll: '#[ '.
+ (label findTokens: ' ' "#[0 0 0 0 0]") withIndexDo: [:token :index |
+ (index between: begin and: end)
+ ifTrue: [stream nextPutAll: token]
+ ifFalse: ["Skip byte info" stream nextPut: $.].
+ stream space].
+ stream nextPutAll: ']'.
+ ]]].
+
"Type aliases to atomic types store primitive Smalltalk objects in their handle. Indicate that role of actually being a handle for the FFI plugin with a small prefix."
+ ^ '-> ', label!
- ^ '-> ', super objectString!
Item was added:
+ ----- Method: ExternalStructure>>explore (in category '*FFI-Tools') -----
+ explore
+ "Sneak in a reader so that do-its will work better from the obeject explorer."
+
+ self reader perform: #explore withArguments: #() inSuperclass: ExternalObject.!