Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.77.mcz
==================== Summary ====================
Name: FFI-Kernel-mt.77
Author: mt
Time: 27 May 2020, 3:01:22.394043 pm
UUID: e182b78a-b899-7c4c-afd8-ad1642c7c800
Ancestors: FFI-Kernel-mt.76
Since ExternalAddress makes extensive use of #wordSize, avoid spreading FFIPlatformDescription but re-introduce the message #wordSize instead.
...I hope this has no implications on performance in general, because wordSize was a class-side instVar in ExternalAddress before.
=============== Diff against FFI-Kernel-mt.76 ===============
Item was changed:
----- Method: ExternalAddress class>>allBeNullAndResize (in category 'system startup') -----
allBeNullAndResize
"Null all instances by becomming to new (and hence null) pointers of the platform's current word size."
| instances wordSize |
instances := self allInstances.
+ wordSize := self wordSize.
- wordSize := FFIPlatformDescription current wordSize.
instances elementsForwardIdentityTo:
(instances collect: [:address | self basicNew: wordSize]).!
Item was changed:
----- Method: ExternalAddress class>>new (in category 'instance creation') -----
new
"External addresses are either four or eight bytes long."
+ ^super new: self wordSize!
- ^super new: FFIPlatformDescription current wordSize!
Item was changed:
----- Method: ExternalAddress class>>new: (in category 'instance creation') -----
new: n
"Only create ExternalAddresses of the right size."
+ ^n = self wordSize
- ^n = FFIPlatformDescription current wordSize
ifTrue: [super new: n]
ifFalse: [self shouldNotImplement]!
Item was added:
+ ----- Method: ExternalAddress class>>wordSize (in category 'constants') -----
+ wordSize
+
+ ^ FFIPlatformDescription current wordSize!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.434.mcz
==================== Summary ====================
Name: Tests-ul.434
Author: ul
Time: 27 May 2020, 3:33:20.792457 am
UUID: 9d3d7a92-4f24-4d36-89ef-f928de795b1f
Ancestors: Tests-nice.433
- speed up DecompilerTests >> #classNames by only computing #category once per class
=============== Diff against Tests-nice.433 ===============
Item was changed:
----- Method: DecompilerTests>>classNames (in category 'utilities') -----
classNames
"A list of the classes in most of the base packages; excluding EToys arbitrarily for now"
+
+ | prefixes |
+ prefixes := self basePackagePrefixes.
^Smalltalk globals allClassesAndTraits
select:
[:classOrTrait|
+ classOrTrait category
+ ifNil: [false]
+ ifNotNil:
+ [:category|
+ prefixes anySatisfy: [:packageRoot| category beginsWith: packageRoot]]]
- self basePackagePrefixes anySatisfy:
- [:packageRoot|
- classOrTrait category ifNil: [false] ifNotNil: [:cat| cat beginsWith: packageRoot]]]
thenCollect:
[:classOrTrait| classOrTrait name]!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1661.mcz
==================== Summary ====================
Name: Morphic-mt.1661
Author: mt
Time: 25 May 2020, 10:53:39.154474 am
UUID: 4adc6920-02b1-7f44-929b-a8291944dff2
Ancestors: Morphic-mt.1660
Makes StringMorph >> #font:emphasis: more robust and clear. Thanks to Martin Kuball and Subbu (kks)!
=============== Diff against Morphic-mt.1660 ===============
Item was changed:
----- Method: StringMorph>>font:emphasis: (in category 'accessing - convenience') -----
+ font: aFontOrNil emphasis: emphasisCodeOrNil
+ "For convenience only. Try to use #font: and #emphasis: instead.
+
+ Changes font and/or emphasis. If both are given, the font's current emphasis will be discarded. If only the emphasis is given, the system's default font will be used. If only the font is given, the font's emphasis will be cached so that future calls to #font: will keep the emphasis."
- font: aFont emphasis: emphasisCode
self
+ assert: aFontOrNil notNil | emphasisCodeOrNil notNil
+ description: 'Either font or emphasis must be non-nil.'.
+
+ self
+ setFont: ((aFontOrNil isNil or: [aFontOrNil emphasis = emphasisCodeOrNil] or: [emphasisCodeOrNil isNil])
+ ifTrue: [aFontOrNil]
+ ifFalse: [aFontOrNil emphasized: emphasisCodeOrNil])
+ emphasis: (emphasisCodeOrNil ifNil: [aFontOrNil emphasis]).
+
+ "self assert: self font emphasis = self emphasis. --- mt: Does not always work because of how StrikeFont treats emphasis 0 in #emphasized:."!
- setFont: ((aFont isNil or: [aFont emphasis = emphasisCode] or: [emphasisCode isNil])
- ifTrue: [aFont]
- ifFalse: [aFont emphasized: emphasisCode])
- emphasis: (emphasisCode ifNil: [aFont emphasis]).!
Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.74.mcz
==================== Summary ====================
Name: FFI-Kernel-mt.74
Author: mt
Time: 20 May 2020, 7:58:09.494513 pm
UUID: 64a250fc-5c9d-9a40-9dd2-2e84b8bd8f9c
Ancestors: FFI-Kernel-mt.73
Adds some support for calling #free from within the image to then also get usable print strings for the instances of ExternalStructure.
Not sure whether it makes sense, but maybe we could store an additional flag in ExternalStructure. Just checking handle for nil seems weird...
=============== Diff against FFI-Kernel-mt.73 ===============
Item was changed:
----- Method: ExternalStructure>>printNullOn: (in category 'printing') -----
printNullOn: stream
+ handle ifNil: [^ stream nextPutAll: '<UNDEFINED>'].
+
self isNull ifTrue: [
stream nextPutAll: '<NULL>'].!
Item was changed:
----- Method: ExternalStructure>>printPointerOn: (in category 'printing') -----
printPointerOn: stream
+ handle ifNil: [^ stream nextPutAll: '<UNDEFINED>'].
+
handle isExternalAddress
ifTrue: [stream nextPutAll: '*'].!