Questions about FloatArrays
Luciano Esteban Notarfrancesco
lnotarfr at dc.uba.ar
Fri Jun 12 19:21:41 UTC 1998
On Fri, 12 Jun 1998, Hans-Martin Mosner wrote:
> I would propose to go further than that and change the format of Floats
> as well, to make all float-containing objects be usable from the
> platform without special macros. This would require the image startup
> code of the VM (which does the byte swapping) to be modified to swap
> floats as well.
> Alternatively, the code in the image that gets executed upon startup
> could do the swapping, since it should not rely on functioning Floats.
I like this... But I don't have the courage to do such dramatical change. ;)
> However, this opens another, more difficult, question:
> Since doubles on some platforms have to be 8-byte aligned, objects (at
> least those potentially containing doubles) should probably be aligned
> on 8-byte minus 4.
> Would it be possible to modify the object memory to ensure this
> alignment for variableWordSubclasses, at least?
I didn't have problems with this yet...
Doubles need alignment in some plataform, but floats need it too?
I have no experience on the subject. May be the best way to handle this
is doing what Andreas proposes, i.e. using floats instead of doubles for
Have you implemented FloatArrays? If so, could you tell me a bit
more about your implementation? I'd like to take a look at your changes.
More information about the Squeak-dev