FloatArrayPlugin & 64bitting
Tim Rowledge
tim at rowledge.org
Fri Apr 29 01:12:05 UTC 2005
FloatArrayPlugin doesn't feel well when we generate it from the 64bit VMMaker alpha. It has a clause:-
}
rcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));
/* Check if any of the argument's values is zero */
argPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));
for (i = 0; i <= (length - 1); i += 1) {
if ((longAt(argPtr + i)) == 0) {
return interpreterProxy->primitiveFail();
}
which upsets the typing of longAt since it expects an sqInt. I can trivially alter it to cast the rcvrPtr to an sqInt for the use of the longAt and it compiles/runs ok.
I have no idea if a 64bit machine will have floats of 64 bits (ie the same as sqInt) or if they stay 32bit (ie we have to use plain int, which may upset longAt on a 64bit machine) or what. And since I have no 64bit setup, I can't say I'm massively bothered right now. But somebody probably is and if anyone cares to suggest the nicest fix I'll happily include it.
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
No single raindrop believes it is to blame for the flood
More information about the Vm-dev
mailing list