Ignore:
Timestamp:
Oct 19, 2010, 4:55:08 PM (15 years ago)
Author:
[email protected]
Message:

2010-10-19 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

Remove support for JSVALUE32 from JSC
https://bugs.webkit.org/show_bug.cgi?id=47948

Remove all the code for supporting JSVALUE32 from JSC.

  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases):
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::emit_op_lshift): (JSC::JIT::emitSlow_op_lshift): (JSC::JIT::emit_op_rshift): (JSC::JIT::emitSlow_op_rshift): (JSC::JIT::emit_op_urshift): (JSC::JIT::emitSlow_op_urshift): (JSC::JIT::emit_op_jnless): (JSC::JIT::emitSlow_op_jnless): (JSC::JIT::emit_op_jless): (JSC::JIT::emitSlow_op_jless): (JSC::JIT::emit_op_jlesseq): (JSC::JIT::emitSlow_op_jlesseq): (JSC::JIT::emit_op_bitand): (JSC::JIT::emit_op_post_inc): (JSC::JIT::emit_op_post_dec): (JSC::JIT::emit_op_pre_inc): (JSC::JIT::emit_op_pre_dec): (JSC::JIT::emit_op_mod): (JSC::JIT::emitSlow_op_mod):
  • jit/JITCall.cpp:
  • jit/JITInlineMethods.h: (JSC::JIT::emitGetFromCallFrameHeaderPtr): (JSC::JIT::emitGetFromCallFrameHeader32):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_loop_if_lesseq): (JSC::JIT::emit_op_bitnot): (JSC::JIT::emit_op_next_pname):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emit_op_put_by_val):
  • jit/JITStubs.h:
  • jit/JSInterfaceJIT.h:
  • jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::returnDouble): (JSC::SpecializedThunkJIT::tagReturnAsInt32):
  • jit/ThunkGenerators.cpp: (JSC::sqrtThunkGenerator): (JSC::powThunkGenerator):
  • runtime/Collector.cpp: (JSC::isPossibleCell): (JSC::typeName):
  • runtime/JSCell.h:
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
  • runtime/JSGlobalData.h:
  • runtime/JSGlobalObject.h: (JSC::Structure::prototypeForLookup):
  • runtime/JSImmediate.h: (JSC::reinterpretIntptrToDouble): (JSC::JSImmediate::isIntegerNumber): (JSC::JSImmediate::isDouble): (JSC::JSImmediate::areBothImmediateIntegerNumbers): (JSC::JSImmediate::makeDouble): (JSC::JSImmediate::doubleValue): (JSC::JSImmediate::toBoolean): (JSC::JSImmediate::fromNumberOutsideIntegerRange): (JSC::JSImmediate::from): (JSC::JSImmediate::toDouble): (JSC::JSFastMath::rightShiftImmediateNumbers):
  • runtime/JSNumberCell.cpp:
  • runtime/JSNumberCell.h:
  • runtime/JSObject.h: (JSC::JSObject::JSObject):
  • runtime/JSValue.h:
  • runtime/NumberObject.h:
  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSImmediate.h

    r62419 r70111  
    2323#define JSImmediate_h
    2424
    25 #if !USE(JSVALUE32_64)
     25#if USE(JSVALUE64)
    2626
    2727#include <wtf/Assertions.h>
     
    4545    class UString;
    4646
    47 #if USE(JSVALUE64)
    4847    inline intptr_t reinterpretDoubleToIntptr(double value)
    4948    {
     
    5554        return WTF::bitwise_cast<double>(value);
    5655    }
    57 #endif
    5856
    5957    /*
     
    160158        friend JSValue jsNumber(JSGlobalData* globalData, unsigned long long i);
    161159
    162 #if USE(JSVALUE64)
    163160        // If all bits in the mask are set, this indicates an integer number,
    164161        // if any but not all are set this value is a double precision number.
     
    167164        // with a 16-bit pattern within the range 0x0001..0xFFFE.
    168165        static const intptr_t DoubleEncodeOffset = 0x1000000000000ll;
    169 #elif USE(JSVALUE32)
    170         static const intptr_t TagTypeNumber = 0x1; // bottom bit set indicates integer, this dominates the following bit
    171 #endif
    172166        static const intptr_t TagBitTypeOther   = 0x2; // second bit set indicates immediate other than an integer
    173167        static const intptr_t TagMask           = TagTypeNumber | TagBitTypeOther;
     
    182176        static const intptr_t FullTagTypeNull      = TagBitTypeOther;
    183177
    184 #if USE(JSVALUE64)
    185178        static const int32_t IntegerPayloadShift  = 0;
    186 #else
    187         static const int32_t IntegerPayloadShift  = 1;
    188 #endif
    189179        static const int32_t ExtendedPayloadShift = 4;
    190180
     
    205195        static ALWAYS_INLINE bool isIntegerNumber(JSValue v)
    206196        {
    207 #if USE(JSVALUE64)
    208197            return (rawValue(v) & TagTypeNumber) == TagTypeNumber;
    209 #else
    210             return isNumber(v);
    211 #endif
    212         }
    213 
    214 #if USE(JSVALUE64)
     198        }
     199
    215200        static ALWAYS_INLINE bool isDouble(JSValue v)
    216201        {
    217202            return isNumber(v) && !isIntegerNumber(v);
    218203        }
    219 #endif
    220204
    221205        static ALWAYS_INLINE bool isPositiveIntegerNumber(JSValue v)
     
    261245        static ALWAYS_INLINE bool areBothImmediateIntegerNumbers(JSValue v1, JSValue v2)
    262246        {
    263 #if USE(JSVALUE64)
    264247            return (rawValue(v1) & rawValue(v2) & TagTypeNumber) == TagTypeNumber;
    265 #else
    266             return rawValue(v1) & rawValue(v2) & TagTypeNumber;
    267 #endif
    268248        }
    269249
     
    286266
    287267    private:
    288 #if USE(JSVALUE64)
    289268        static const int minImmediateInt = ((-INT_MAX) - 1);
    290269        static const int maxImmediateInt = INT_MAX;
    291 #else
    292         static const int minImmediateInt = ((-INT_MAX) - 1) >> IntegerPayloadShift;
    293         static const int maxImmediateInt = INT_MAX >> IntegerPayloadShift;
    294 #endif
    295270        static const unsigned maxImmediateUInt = maxImmediateInt;
    296271
     
    303278        // integer doesn't interfere with the tag bits in the upper word.  In the default encoding,
    304279        // if intptr_t id larger then int32_t we sign extend the value through the upper word.
    305 #if USE(JSVALUE64)
    306280        static ALWAYS_INLINE JSValue makeInt(uint32_t value)
    307 #else
    308         static ALWAYS_INLINE JSValue makeInt(int32_t value)
    309 #endif
    310281        {
    311282            return makeValue((static_cast<intptr_t>(value) << IntegerPayloadShift) | TagTypeNumber);
    312283        }
    313284       
    314 #if USE(JSVALUE64)
    315285        static ALWAYS_INLINE JSValue makeDouble(double value)
    316286        {
    317287            return makeValue(reinterpretDoubleToIntptr(value) + DoubleEncodeOffset);
    318288        }
    319 #endif
    320289       
    321290        static ALWAYS_INLINE JSValue makeBool(bool b)
     
    337306        static JSValue fromNumberOutsideIntegerRange(T);
    338307
    339 #if USE(JSVALUE64)
    340308        static ALWAYS_INLINE double doubleValue(JSValue v)
    341309        {
    342310            return reinterpretIntptrToDouble(rawValue(v) - DoubleEncodeOffset);
    343311        }
    344 #endif
    345312
    346313        static ALWAYS_INLINE int32_t intValue(JSValue v)
     
    372339    ALWAYS_INLINE JSValue JSImmediate::oneImmediate() { return makeInt(1); }
    373340
    374 #if USE(JSVALUE64)
    375341    inline bool doubleToBoolean(double value)
    376342    {
     
    384350            : doubleToBoolean(doubleValue(v)) : v == trueImmediate();
    385351    }
    386 #else
    387     ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue v)
    388     {
    389         ASSERT(isImmediate(v));
    390         return isIntegerNumber(v) ? v != zeroImmediate() : v == trueImmediate();
    391     }
    392 #endif
    393352
    394353    ALWAYS_INLINE uint32_t JSImmediate::getTruncatedUInt32(JSValue v)
     
    399358    }
    400359
    401 #if USE(JSVALUE64)
    402360    template<typename T>
    403361    inline JSValue JSImmediate::fromNumberOutsideIntegerRange(T value)
     
    405363        return makeDouble(static_cast<double>(value));
    406364    }
    407 #else
    408     template<typename T>
    409     inline JSValue JSImmediate::fromNumberOutsideIntegerRange(T)
    410     {
    411         return JSValue();
    412     }
    413 #endif
    414365
    415366    ALWAYS_INLINE JSValue JSImmediate::from(char i)
     
    440391    ALWAYS_INLINE JSValue JSImmediate::from(int i)
    441392    {
    442 #if !USE(JSVALUE64)
    443         if ((i < minImmediateInt) | (i > maxImmediateInt))
    444             return fromNumberOutsideIntegerRange(i);
    445 #endif
    446393        return makeInt(i);
    447394    }
     
    506453            return intValue(v);
    507454
    508 #if USE(JSVALUE64)
    509455        if (isNumber(v)) {
    510456            ASSERT(isDouble(v));
    511457            return doubleValue(v);
    512458        }
    513 #else
    514         ASSERT(!isNumber(v));
    515 #endif
    516459
    517460        if (rawValue(v) == FullTagTypeUndefined)
     
    671614        {
    672615            ASSERT(canDoFastRshift(val, shift) || canDoFastUrshift(val, shift));
    673 #if USE(JSVALUE64)
    674616            return JSImmediate::makeValue(static_cast<intptr_t>(static_cast<uint32_t>(static_cast<int32_t>(JSImmediate::rawValue(val)) >> ((JSImmediate::rawValue(shift) >> JSImmediate::IntegerPayloadShift) & 0x1f))) | JSImmediate::TagTypeNumber);
    675 #else
    676             return JSImmediate::makeValue((JSImmediate::rawValue(val) >> ((JSImmediate::rawValue(shift) >> JSImmediate::IntegerPayloadShift) & 0x1f)) | JSImmediate::TagTypeNumber);
    677 #endif
    678617        }
    679618
     
    719658} // namespace JSC
    720659
    721 #endif // !USE(JSVALUE32_64)
     660#endif // USE(JSVALUE64)
    722661
    723662#endif // JSImmediate_h
Note: See TracChangeset for help on using the changeset viewer.