Hi,
Here is a quick draft for more array sizes as discussed last week.
http://smalltalkhub.com/#!/~ThibaultRaffaillac/Collections-ArraysIt yields (* => new):
SByteArray* and ByteArray
ShortArray* and UShortArray*
IntegerArray and UIntegerArray*
LongArray* and ULongArray*
SWordArray* and WordArray
FloatArray and DoubleArray*
I don't know if this is the right way to make a package (also considering the obvious name), anyway here are the unresolved issues:
_ ByteArray and WordArray are unsigned, IntegerArray is signed! The package does not rename any though, I go for conservative :p
_ Do we have primitives for 8/16/32/64 sreads/ureads/writes? Doing sign extension by hand is painful.
_ Same for 32/64 bit IEEE float reads/writes? Current code implicitly transfers float values through integer registers which is SLOW (worse on ARM).
_ A big part of the system is hardcoded with assumption (isBytes or isWords), therefore the inspector does not seem to display values&metadata properly. We should probably fix all occurrences of isBytes. Is there a bug filed already?
Cheers,
Thibault