[webkit-help] 4.6 64-bit webkit issue
Ben Taylor
bentaylor.solx86 at gmail.com
Thu Dec 24 06:55:01 PST 2009
in qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.h
at line 473
inline JSValue::JSValue(JSCell* ptr)
{
if (ptr)
u.asBits.tag = CellTag;
else
u.asBits.tag = EmptyValueTag;
u.asBits.payload = reinterpret_cast<int32_t>(ptr);
}
inline JSValue::JSValue(const JSCell* ptr)
{
if (ptr)
u.asBits.tag = CellTag;
else
u.asBits.tag = EmptyValueTag;
u.asBits.payload = reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr));
}
When compiling this on 32-bit this works fine. Unfortunately, the
compiler doesn't
like the cast from ptr to 32-bit on a 64-bit system. I did a quicky
fix to use int64_t,
which does "fix the compile problem", but I believe is not the solution.
I've just started porting 4.6.0 to Solaris using the Studio12
compilers, and it seems
that some sort of conditional cast should be used, given what I can
see in the code.
I'm sure I could use something like an #ifdef __LP64 and just use two different
lines for the reinterpret_case <X> ptr.
Guidance?
Thanks
Ben
More information about the webkit-help
mailing list