Changeset 49030 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Oct 2, 2009, 11:06:49 AM (16 years ago)
Author:
[email protected]
Message:

Rolled back in r49004 with the debug 64bit build fixed

Location:
trunk/JavaScriptCore/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSValue.cpp

    r49005 r49030  
    111111    static const size_t size = 32;
    112112    static char description[size];
    113     if (isInt32())
     113
     114    if (!*this)
     115        snprintf(description, size, "<JSValue()>");
     116    else if (isInt32())
    114117        snprintf(description, size, "Int32: %d", asInt32());
    115118    else if (isDouble())
  • trunk/JavaScriptCore/runtime/JSValue.h

    r49005 r49030  
    214214        enum { NullTag =         0xfffffffb };
    215215        enum { UndefinedTag =    0xfffffffa };
    216         enum { DeletedValueTag = 0xfffffff9 };
     216        enum { EmptyValueTag =   0xfffffff9 };
     217        enum { DeletedValueTag = 0xfffffff8 };
    217218
    218219        enum { LowestTag =  DeletedValueTag };
     
    428429    inline JSValue::JSValue()
    429430    {
    430         u.asBits.tag = CellTag;
     431        u.asBits.tag = EmptyValueTag;
    431432        u.asBits.payload = 0;
    432433    }
     
    464465    inline JSValue::JSValue(JSCell* ptr)
    465466    {
    466         u.asBits.tag = CellTag;
     467        if (ptr)
     468            u.asBits.tag = CellTag;
     469        else
     470            u.asBits.tag = EmptyValueTag;
    467471        u.asBits.payload = reinterpret_cast<int32_t>(ptr);
    468472    }
     
    470474    inline JSValue::JSValue(const JSCell* ptr)
    471475    {
    472         u.asBits.tag = CellTag;
     476        if (ptr)
     477            u.asBits.tag = CellTag;
     478        else
     479            u.asBits.tag = EmptyValueTag;
    473480        u.asBits.payload = reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr));
    474481    }
     
    476483    inline JSValue::operator bool() const
    477484    {
    478         return u.asBits.payload || tag() != CellTag;
     485        ASSERT(tag() != DeletedValueTag);
     486        return tag() != EmptyValueTag;
    479487    }
    480488
Note: See TracChangeset for help on using the changeset viewer.