Bug #160 » dyson-js-solaris-memory-layout.patch
| qt4-x11-4.8.5+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h 2013-10-30 06:26:28.052147518 +0400 | ||
|---|---|---|
|
static const int32_t signBit = 0x80000000;
|
||
|
|
||
|
#if OS(SOLARIS64)
|
||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=577056
|
||
|
// Memory layout for 64-bit Solaris is different than other 64-bit systems.
|
||
|
// http://developers.sun.com/solaris/articles/solaris_memory.html
|
||
|
// User space memory may locate on PART-A (0xFFFFFD80.00000000 - 0xFFFF8000.00000000)
|
||
|
// and PART-B (0x00008000.00000000 - 0x00000000.04000000).
|
||
|
static ALWAYS_INLINE bool isSolaris64StackPointer(JSValue v)
|
||
|
{
|
||
|
return ((rawValue(v) & 0xFFFF800000000000LL) == 0xFFFF800000000000LL);
|
||
|
}
|
||
|
#endif
|
||
|
static ALWAYS_INLINE bool isImmediate(JSValue v)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
#endif
|
||
|
return rawValue(v) & TagMask;
|
||
|
}
|
||
|
|
||
|
static ALWAYS_INLINE bool isNumber(JSValue v)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
#endif
|
||
|
return rawValue(v) & TagTypeNumber;
|
||
|
}
|
||
|
static ALWAYS_INLINE bool isIntegerNumber(JSValue v)
|
||
|
{
|
||
|
#if USE(JSVALUE64)
|
||
|
# if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
# endif
|
||
|
return (rawValue(v) & TagTypeNumber) == TagTypeNumber;
|
||
|
#else
|
||
|
return isNumber(v);
|
||
| ... | ... | |
|
#if USE(JSVALUE64)
|
||
|
static ALWAYS_INLINE bool isDouble(JSValue v)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
#endif
|
||
|
return isNumber(v) && !isIntegerNumber(v);
|
||
|
}
|
||
|
#endif
|
||
|
static ALWAYS_INLINE bool isPositiveIntegerNumber(JSValue v)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
#endif
|
||
|
// A single mask to check for the sign bit and the number tag all at once.
|
||
|
return (rawValue(v) & (signBit | TagTypeNumber)) == TagTypeNumber;
|
||
|
}
|
||
|
|
||
|
static ALWAYS_INLINE bool isBoolean(JSValue v)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
#endif
|
||
|
return (rawValue(v) & FullTagTypeMask) == FullTagTypeBool;
|
||
|
}
|
||
|
|
||
|
static ALWAYS_INLINE bool isUndefinedOrNull(JSValue v)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v))
|
||
|
return false;
|
||
|
#endif
|
||
|
// Undefined and null share the same value, bar the 'undefined' bit in the extended tag.
|
||
|
return (rawValue(v) & ~ExtendedTagBitUndefined) == FullTagTypeNull;
|
||
|
}
|
||
| ... | ... | |
|
static ALWAYS_INLINE bool isEitherImmediate(JSValue v1, JSValue v2)
|
||
|
{
|
||
|
#if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v1) && isSolaris64StackPointer(v2))
|
||
|
return false;
|
||
|
#endif
|
||
|
return (rawValue(v1) | rawValue(v2)) & TagMask;
|
||
|
}
|
||
| ... | ... | |
|
static ALWAYS_INLINE bool areBothImmediateIntegerNumbers(JSValue v1, JSValue v2)
|
||
|
{
|
||
|
#if USE(JSVALUE64)
|
||
|
# if OS(SOLARIS64)
|
||
|
if (isSolaris64StackPointer(v1) || isSolaris64StackPointer(v2))
|
||
|
return false;
|
||
|
# endif
|
||
|
return (rawValue(v1) & rawValue(v2) & TagTypeNumber) == TagTypeNumber;
|
||
|
#else
|
||
|
return rawValue(v1) & rawValue(v2) & TagTypeNumber;
|
||
| qt4-x11-4.8.5+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2013-10-30 06:30:45.148834844 +0400 | ||
|---|---|---|
|
/* OS(SOLARIS) - Solaris */
|
||
|
#if defined(sun) || defined(__sun)
|
||
|
#define WTF_OS_SOLARIS 1
|
||
|
#if defined(__LP64__)
|
||
|
#define WTF_OS_SOLARIS64 1
|
||
|
#endif
|
||
|
#endif
|
||
|
/* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
|
||
- « Previous
- 1
- 2
- 3
- Next »