KJS::SimpleNumber on 64 bit machines

Harri Porten porten at froglogic.com
Wed Oct 1 23:29:54 CEST 2003


On Wed, 1 Oct 2003, Maciej Stachowiak wrote:

> On Oct 1, 2003, at 10:17 AM, Harri Porten wrote:
> 
> Is this a problem for all 64-bit architectures, or just Alphas and 
> their particular handling of signalling NaNs?

As I wrote in my other mail it seems just to be an alpha issue. Didn't
know that gcc defaults to this faster-but-different mode.

> I'd definitely like to get rid of the warnings, though. Maybe it would 
> be better to use long, or intptr_t, and pick the masks and such based 
> on sizeof(long)?

Yeah. Either of those. Unfortunately my connection to an Alpha is too slow
to conveniently debug this. I assume that you'll have to do some
other 64-bit porting job at Apple some day. Maybe you get the chance to
clean this one up, too.

Meanwhile I got a bit further. Basic features work but the
khtmltests/js/Number.js tests produces segfaults in different places of
dtoa.cpp. Like:

#0  0x120017cec in d2b (d=123.456, e=0x1fffe394, bits=0x11fffe388)
    at dtoa.cpp:1342
#1  0x120019df4 in kjs_dtoa (d=123.456, mode=0, ndigits=0,
decpt=0x11fffe510, 
    sign=0x11fffe670, rve=0x0) at dtoa.cpp:2750
#2  0x12007bcbc in KJS::NumberProtoFuncImp::call(KJS::ExecState*,
KJS::Object&, KJS::List const&) (this=0x1200e95e0, exec=0x11fffecc0,
thisObj=@0x11fffe8c0, 
    args=@0x11fffe890) at number_object.cpp:256

Seems like this library is not portable to the alpha. Or
the correct #defines aren't set. I don't understand enough of IEEE to
figure this one out. I added a lame replacement of kjs_dtoa but don't
think that's the way to go.

Harri.



More information about the Khtml-devel mailing list