Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.419.mcz
==================== Summary ====================
Name: Tests-ct.419
Author: ct
Time: 1 October 2019, 4:28:42.992339 pm
UUID: 63e06a89-0e97-2148-9c0c-79494748ca43
Ancestors: Tests-ul.418
Add regression test for a bug in SystemNavigation>>#allImplementorsOf:localTo: (a fix is coming soon)
=============== Diff against Tests-ul.418 ===============
Item was added:
+ ----- Method: SystemNavigationTest>>testAllImplementorsOfLocalTo (in category 'tests') -----
+ testAllImplementorsOfLocalTo
+ | result |
+ result := sysNav allImplementorsOf: #yourself localTo: Morph.
+ self assert: [result size = 1].
+ self assert: [result includes: (MethodReference class: Object selector: #yourself)].!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1107.mcz
==================== Summary ====================
Name: System-ct.1107
Author: ct
Time: 1 October 2019, 4:30:20.065339 pm
UUID: de49d2b3-27eb-6d48-8afa-2a93b8b0ed51
Ancestors: System-mt.1102
Fixes bug in #allImplementorsOf:localTo: concerning duplicates, revealed in Tests-ct.419
== text below is ignored ===
Ancestors: System-mt.1102
System-mt.1102:
Adds a simple, yet convenient, way to scale icons for demo/hi-dpi mode.
A no-scale takes about 150 nanoseconds on my machine, which should be okay --- performance-wise --- for existing tools. Maybe we can improve the code a little bit more for the default scale.
Note that one could also use icons with s higher resolution, which would then be down-scaled to the reference extent...
A ChangeSet class>>removeEmptyChangeSets
M ChangeSet class>>removeEmptyUnnamedChangeSets
M MethodReference
M Preferences class>>changeFontSize:
M Preferences class>>setDefaultFonts:
M Preferences class>>useFormsInPaintBox
A Project>>interruptSystem:
M Project>>previewImageForm
D Project>>setViewSize:
A Project>>transcript
A Project>>userDelete
A Project>>viewSize:
M SmalltalkImage>>handleUserInterrupt
M SystemNavigation>>allImplementorsOf:localTo:
A ToolSet class>>browseMethod:
M Utilities class>>initializeCommonRequestStrings
=============== Diff against System-mt.1102 ===============
Item was changed:
----- Method: SystemNavigation>>allImplementorsOf:localTo: (in category 'query') -----
allImplementorsOf: aSelector localTo: aClass
"Answer a sorted collection of all the methods that are named aSelector in, above, or below the given class."
| result |
+ result := Set new.
- result := OrderedCollection new.
{ aClass theNonMetaClass. aClass theMetaClass } do: [ :baseClass |
baseClass withAllSuperAndSubclassesDoGently: [ :class |
(class includesSelector: aSelector) ifTrue: [
result add: (MethodReference class: class selector: aSelector) ] ] ].
+ ^result sorted!
- ^result sort!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1108.mcz
==================== Summary ====================
Name: System-mt.1108
Author: mt
Time: 2 October 2019, 9:32:00.730936 am
UUID: 39de5334-f54e-4440-a28b-06efad556bb6
Ancestors: System-ct.1107
Fixes and revises System-ct.1107.
=============== Diff against System-mt.1102 ===============
Item was changed:
----- Method: SystemNavigation>>allImplementorsOf:localTo: (in category 'query') -----
allImplementorsOf: aSelector localTo: aClass
"Answer a sorted collection of all the methods that are named aSelector in, above, or below the given class."
| result |
result := OrderedCollection new.
+ aClass theNonMetaClass withAllSuperAndSubclassesDoGently: [:class |
+ (class includesSelector: aSelector) ifTrue: [
+ result add: (MethodReference class: class selector: aSelector) ].
+ (class class includesSelector: aSelector) ifTrue: [
+ result add: (MethodReference class: class class selector: aSelector) ] ].
- { aClass theNonMetaClass. aClass theMetaClass } do: [ :baseClass |
- baseClass withAllSuperAndSubclassesDoGently: [ :class |
- (class includesSelector: aSelector) ifTrue: [
- result add: (MethodReference class: class selector: aSelector) ] ] ].
^result sort!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1270.mcz
==================== Summary ====================
Name: Kernel-nice.1270
Author: nice
Time: 1 October 2019, 9:22:39.460936 pm
UUID: 05ae7bbb-2517-4c6e-a9c0-db89b42742e5
Ancestors: Kernel-mt.1269
In SmallFloat64>>#truncated fallback, don't bother with Infinities and NaN, since all SmallFloat64 are finite, nor with Float fractionPart, since all non-integer Float value fits in SmallInteger in a 64bits image, and thus are already handled by the primitive.
It's legitimate to inject such implementation specific knowledge into this implementation specific class.
Also revise BoxedFloat64>>#truncated, mostly with comments. Dividing by SmallInteger maxVal + 1 / 2 would lead to an infinite loop in a 64bits image, fortunately this branch is unreachable then. Each time I read it, I have the shadow of a doubt ;)
=============== Diff against Kernel-mt.1269 ===============
Item was changed:
----- Method: BoxedFloat64>>truncated (in category 'truncation and round off') -----
truncated
"Answer with a SmallInteger equal to the value of the receiver without
its fractional part. The primitive fails if the truncated value cannot be
represented as a SmallInteger. In that case, the code below will compute
a LargeInteger truncated value.
Essential. See Object documentation whatIsAPrimitive. "
<primitive: 51>
self isFinite ifFalse: [self error: 'Cannot truncate this number'].
+ self abs < 4.503599627370496e15
+ "Float maxExactInteger/2 = (1.0 timesTwoPower: Float precision - 1)"
+ "Every Float bigger than or equal to that has ulp >= 1, thus no fractionPart"
-
- self abs < 2.0e16
ifTrue: ["Fastest way when it may not be an integer"
+ "This branch is unreachable in 64 bits image"
| di df q r |
di := 1 + (SmallInteger maxVal bitShift: -1).
df := di asFloat.
q := self quo: df.
r := self - (q asFloat * df).
^q * di + r truncated]
+ ifFalse: [^ self asTrueFraction. "Extract all bits of the significand and shift if necessary"]
- ifFalse: [^ self asTrueFraction. "Extract all bits of the mantissa and shift if necess"]
!
Item was changed:
----- Method: SmallFloat64>>truncated (in category 'truncation and round off') -----
truncated
"Answer with a SmallInteger equal to the value of the receiver without
its fractional part. The primitive fails if the truncated value cannot be
represented as a SmallInteger. In that case, the code below will compute
a LargeInteger truncated value.
Essential. See Object documentation whatIsAPrimitive. "
<primitive: 551>
+ "Since SmallInteger maxVal highBit >= Float precision, in 64bits image/VM,
+ every Float with ulp < 1 - that is which may have a fractionPart - fits in a SmallInteger.
+ Thus only care of Float with ulp >= 1 which have Integer value."
+ ^ self asTrueFraction
- self isFinite ifFalse: [self error: 'Cannot truncate this number'].
-
- self abs < 2.0e16
- ifTrue: ["Fastest way when it may not be an integer"
- | di df q r |
- di := 1 + (SmallInteger maxVal bitShift: -1).
- df := di asFloat.
- q := self quo: df.
- r := self - (q asFloat * df).
- ^q * di + r truncated]
- ifFalse: [^ self asTrueFraction. "Extract all bits of the mantissa and shift if necess"]
-
!