[squeak-dev] The Trunk: Collections-eem.904.mcz
christoph.thiede at student.hpi.uni-potsdam.de
christoph.thiede at student.hpi.uni-potsdam.de
Tue Sep 7 22:01:44 UTC 2021
Hi all, hi Eliot,
while revisiting these changes to update our release notes, I have been stumbling upon this patch a second time. Is this a noticeable breaking change that will hinder all (though assumingly few) users of a pre-Spur VM from using FloatArrays any longer or will they only experience a slowdown?
(BTW, it would be great if you could avoid raising warnings/errors and dialogs from the update stream whenever avoidable. Keep in mind that MCMcmUpdater doUpdate: has an interactive flag that can be set to false indeed - e.g., in smalltalkCI or on my TelegramBot raspi and probably in many other places ... :-))
Best,
Christoph
---
Sent from Squeak Inbox Talk
On 2020-07-21T19:48:51+00:00, commits at source.squeak.org wrote:
> Eliot Miranda uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-eem.904.mcz
>
> ==================== Summary ====================
>
> Name: Collections-eem.904
> Author: eem
> Time: 21 July 2020, 12:48:47.966166 pm
> UUID: 5aa53764-ee46-4fee-b681-0bc142550102
> Ancestors: Collections-ul.903
>
> Supercede the slow Float[64]ArrayPlugin>>at:[put:] primitives with much faster ones in the Spur VM.
>
> =============== Diff against Collections-ul.903 ===============
>
> Item was changed:
> + (PackageInfo named: 'Collections') preamble: '"Use of the Spur FloatArray>>at:[put:] prims requires at least VMMaker.oscog.2778"
> - (PackageInfo named: 'Collections') preamble: '"FloatArray is going to become the abstract class above Float32Array and Float64Array.
> - In order to avoid spurious instance migration or recompilation errors, this preamble is required."
>
> + Smalltalk vmVMMakerVersion < 2778 ifTrue:
> + [Warning signal: ''This virtual machine is too old to support correct versions of the FloatArray>>at:[put:] primitives 238 and 239. FloatArray subclasses will not behave correctly and FloatArray[64]Test tests will fail. Please upgrade your VM. You may continue and upgrade later or abort and upgrade now.'']'!
> - FloatArray rename: #Float32Array.'!
>
> Item was removed:
> - ----- Method: Float32Array>>at: (in category 'accessing') -----
> - at: index
> - <primitive: 'primitiveAt' module: 'FloatArrayPlugin'>
> - ^Float fromIEEE32Bit: (self basicAt: index)!
>
> Item was removed:
> - ----- Method: Float32Array>>at:put: (in category 'accessing') -----
> - at: index put: value
> - <primitive: 'primitiveAtPut' module: 'FloatArrayPlugin'>
> - value isFloat
> - ifTrue:[self basicAt: index put: value asIEEE32BitWord]
> - ifFalse:[self at: index put: value asFloat].
> - ^value!
>
> Item was removed:
> - ----- Method: Float32Array>>defaultElement (in category 'accessing') -----
> - defaultElement
> - "Return the default element of the receiver"
> - ^0.0!
>
> Item was removed:
> - ----- Method: Float64Array>>at: (in category 'accessing') -----
> - at: index
> - <primitive: 'primitiveAt' module: 'Float64ArrayPlugin'>
> - | f64 u64 |
> - u64 := self basicAt: index.
> - (f64 := Float basicNew)
> - basicAt: 1 put: (u64 >> 32);
> - basicAt: 2 put: (u64 bitAnd: 16rFFFFFFFF).
> - ^f64 * 1.0!
>
> Item was removed:
> - ----- Method: Float64Array>>at:put: (in category 'accessing') -----
> - at: index put: value
> - <primitive: 'primitiveAtPut' module: 'Float64ArrayPlugin'>
> - value isFloat
> - ifTrue:[self basicAt: index put: (value basicAt: 1) << 32 + (value basicAt: 2)]
> - ifFalse:[self at: index put: value asFloat].
> - ^value!
>
> Item was added:
> + ----- Method: FloatArray>>at: (in category 'accessing') -----
> + at: index
> + "Answer the Float at index in the receiver. This method converts from either a 32-bit IEEE representation,
> + or a 64-bit IEEE representation to a Squeak Float object. Primitive. Optional."
> + <primitive: 238 error: ec>
> + ^self bytesPerElement = 4
> + ifTrue: [Float fromIEEE32Bit: (self basicAt: index)]
> + ifFalse: [Float fromIEEE64Bit: (self basicAt: index)]!
>
> Item was added:
> + ----- Method: FloatArray>>at:put: (in category 'accessing') -----
> + at: index put: value
> + "Store the Float value at index in the receiver. This method converts from a Squeak Float object,
> + or an Integer, into either a 32-bit IEEE representation, or a 64-bit IEEE representation. Primitive. Optional."
> + <primitive: 239 error: ec>
> + value isFloat
> + ifTrue:[self basicAt: index put: (self bytesPerElement = 4
> + ifTrue: [value asIEEE32BitWord]
> + ifFalse: [value asIEEE64BitWord])]
> + ifFalse: [self at: index put: value asFloat].
> + ^value!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210908/f910b693/attachment.html>
More information about the Squeak-dev
mailing list
|