The Trunk: Collections-eem.779.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-eem.779.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.779.mcz

==================== Summary ====================

Name: Collections-eem.779
Author: eem
Time: 20 December 2017, 12:47:12.586523 am
UUID: 36376941-8dc4-4b3c-8935-f2839a6321c1
Ancestors: Collections-mt.778

Fix bytesPerBasicElement for Spur.

=============== Diff against Collections-mt.778 ===============

Item was changed:
  ----- Method: ArrayedCollection>>bytesPerBasicElement (in category 'objects from disk') -----
  bytesPerBasicElement
  "Answer the number of bytes that each of my basic elements requires.
  In other words:
  self basicSize * self bytesPerBasicElement
  should equal the space required on disk by my variable sized representation."
+ | bytesPerElementOrZero |
+ bytesPerElementOrZero := #[0 0 0 0 0 0 0 0 8 4 4 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] at: self class instSpec.
+ ^bytesPerElementOrZero = 0
+ ifTrue: [Smalltalk wordSize]
+ ifFalse: [bytesPerElementOrZero]!
- ^self class isBytes ifTrue: [ 1 ] ifFalse: [ 4 ]!