Changeset 84660 in webkit


Ignore:
Timestamp:
Apr 22, 2011 12:26:04 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-22 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r84650 and r84654.
http://trac.webkit.org/changeset/84650
http://trac.webkit.org/changeset/84654
https://bugs.webkit.org/show_bug.cgi?id=59218

Broke Windows build (Requested by bweinstein on #webkit).

  • API/JSCallbackObjectFunctions.h: (JSC::::init):
  • JavaScriptCore.exp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • heap/Handle.h: (JSC::HandleBase::operator!): (JSC::HandleBase::operator UnspecifiedBoolType*): (JSC::HandleTypes::getFromSlot):
  • heap/HandleHeap.cpp: (JSC::HandleHeap::markStrongHandles): (JSC::HandleHeap::markWeakHandles): (JSC::HandleHeap::finalizeWeakHandles): (JSC::HandleHeap::writeBarrier): (JSC::HandleHeap::protectedGlobalObjectCount): (JSC::HandleHeap::isValidWeakNode):
  • heap/HandleHeap.h: (JSC::HandleHeap::copyWeak): (JSC::HandleHeap::makeWeak): (JSC::HandleHeap::Node::slot):
  • heap/HandleStack.cpp: (JSC::HandleStack::mark): (JSC::HandleStack::grow):
  • heap/HandleStack.h: (JSC::HandleStack::zapTo): (JSC::HandleStack::push):
  • heap/Heap.cpp: (JSC::HandleHeap::protectedObjectTypeCounts):
  • heap/Local.h: (JSC::::set):
  • heap/Strong.h: (JSC::Strong::set):
  • heap/Weak.h: (JSC::Weak::set):
  • runtime/StructureTransitionTable.h: (JSC::StructureTransitionTable::singleTransition): (JSC::StructureTransitionTable::setSingleTransition):
  • runtime/WeakGCMap.h: (JSC::WeakGCMap::add): (JSC::WeakGCMap::set):
  • runtime/WriteBarrier.h:
Location:
trunk/Source/JavaScriptCore
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r84650 r84660  
    9797        HandleHeap::heapFor(slot)->makeWeak(slot, m_callbackObjectData.get(), classRef());
    9898        HandleHeap::heapFor(slot)->writeBarrier(slot, this);
    99         slot->fromJSValue(this);
     99        *slot = this;
    100100    }
    101101}
  • trunk/Source/JavaScriptCore/ChangeLog

    r84654 r84660  
     12011-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r84650 and r84654.
     4        http://trac.webkit.org/changeset/84650
     5        http://trac.webkit.org/changeset/84654
     6        https://bugs.webkit.org/show_bug.cgi?id=59218
     7
     8        Broke Windows build (Requested by bweinstein on #webkit).
     9
     10        * API/JSCallbackObjectFunctions.h:
     11        (JSC::::init):
     12        * JavaScriptCore.exp:
     13        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
     14        * heap/Handle.h:
     15        (JSC::HandleBase::operator!):
     16        (JSC::HandleBase::operator UnspecifiedBoolType*):
     17        (JSC::HandleTypes::getFromSlot):
     18        * heap/HandleHeap.cpp:
     19        (JSC::HandleHeap::markStrongHandles):
     20        (JSC::HandleHeap::markWeakHandles):
     21        (JSC::HandleHeap::finalizeWeakHandles):
     22        (JSC::HandleHeap::writeBarrier):
     23        (JSC::HandleHeap::protectedGlobalObjectCount):
     24        (JSC::HandleHeap::isValidWeakNode):
     25        * heap/HandleHeap.h:
     26        (JSC::HandleHeap::copyWeak):
     27        (JSC::HandleHeap::makeWeak):
     28        (JSC::HandleHeap::Node::slot):
     29        * heap/HandleStack.cpp:
     30        (JSC::HandleStack::mark):
     31        (JSC::HandleStack::grow):
     32        * heap/HandleStack.h:
     33        (JSC::HandleStack::zapTo):
     34        (JSC::HandleStack::push):
     35        * heap/Heap.cpp:
     36        (JSC::HandleHeap::protectedObjectTypeCounts):
     37        * heap/Local.h:
     38        (JSC::::set):
     39        * heap/Strong.h:
     40        (JSC::Strong::set):
     41        * heap/Weak.h:
     42        (JSC::Weak::set):
     43        * runtime/StructureTransitionTable.h:
     44        (JSC::StructureTransitionTable::singleTransition):
     45        (JSC::StructureTransitionTable::setSingleTransition):
     46        * runtime/WeakGCMap.h:
     47        (JSC::WeakGCMap::add):
     48        (JSC::WeakGCMap::set):
     49        * runtime/WriteBarrier.h:
     50
    1512011-04-22  Brian Weinstein  <bweinstein@apple.com>
    252
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r84650 r84660  
    9898_WTFReportFatalError
    9999__ZN14OpaqueJSString6createERKN3JSC7UStringE
    100 __ZN3JSC10HandleHeap12writeBarrierEPNS_13OpaqueJSValueERKNS_7JSValueE
     100__ZN3JSC10HandleHeap12writeBarrierEPNS_7JSValueERKS1_
    101101__ZN3JSC10HandleHeap4growEv
    102102__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPN3WTF10StringImplE
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def

    r84654 r84660  
    369369    ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z
    370370    ?writable@PropertyDescriptor@JSC@@QBE_NXZ
     371    ?writeBarrier@HandleHeap@JSC@@QAEXPAVJSValue@2@ABV32@@Z
    371372    ?yield@WTF@@YAXXZ
    372373    WTFLog
  • trunk/Source/JavaScriptCore/heap/Handle.h

    r84650 r84660  
    5454
    5555public:
    56     bool operator!() const { return !m_slot || !m_slot->toJSValue(); }
     56    bool operator!() const { return !m_slot || !*m_slot; }
    5757
    5858    // This conversion operator allows implicit conversion to bool but not to other integer types.
    5959    typedef JSValue (HandleBase::*UnspecifiedBoolType);
    60     operator UnspecifiedBoolType*() const { return (m_slot && m_slot->toJSValue()) ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; }
     60    operator UnspecifiedBoolType*() const { return (m_slot && *m_slot) ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; }
    6161
    6262protected:
     
    8080template <typename T> struct HandleTypes {
    8181    typedef T* ExternalType;
    82     static ExternalType getFromSlot(HandleSlot slot) { return (slot && slot->toJSValue()) ? reinterpret_cast<ExternalType>(slot->toJSValue().asCell()) : 0; }
     82    static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(slot->asCell()) : 0; }
    8383    static JSValue toJSValue(T* cell) { return reinterpret_cast<JSCell*>(cell); }
    8484    template <typename U> static void validateUpcast() { T* temp; temp = (U*)0; }
     
    8787template <> struct HandleTypes<Unknown> {
    8888    typedef JSValue ExternalType;
    89     static ExternalType getFromSlot(HandleSlot slot) { return slot ? slot->toJSValue() : JSValue(); }
     89    static ExternalType getFromSlot(HandleSlot slot) { return slot ? *slot : JSValue(); }
    9090    static JSValue toJSValue(const JSValue& v) { return v; }
    9191    template <typename U> static void validateUpcast() {}
  • trunk/Source/JavaScriptCore/heap/HandleHeap.cpp

    r84650 r84660  
    6565    Node* end = m_strongList.end();
    6666    for (Node* node = m_strongList.begin(); node != end; node = node->next())
    67         heapRootMarker.mark(node->slot()->toJSValueRef());
     67        heapRootMarker.mark(node->slot());
    6868}
    6969
     
    7575    for (Node* node = m_weakList.begin(); node != end; node = node->next()) {
    7676        ASSERT(isValidWeakNode(node));
    77         JSCell* cell = node->slot()->toJSValue().asCell();
     77        JSCell* cell = node->slot()->asCell();
    7878        if (Heap::isMarked(cell))
    7979            continue;
     
    8686            continue;
    8787
    88         heapRootVisitor.mark(node->slot()->toJSValueRef());
     88        heapRootVisitor.mark(node->slot());
    8989    }
    9090}
     
    9797
    9898        ASSERT(isValidWeakNode(node));
    99         JSCell* cell = node->slot()->toJSValue().asCell();
     99        JSCell* cell = node->slot()->asCell();
    100100        if (Heap::isMarked(cell))
    101101            continue;
     
    107107        }
    108108
    109         node->slot()->fromJSValue(JSValue());
     109        *node->slot() = JSValue();
    110110        SentinelLinkedList<Node>::remove(node);
    111111        m_immediateList.push(node);
     
    119119    ASSERT(!m_nextToFinalize); // Forbid assignment to handles during the finalization phase, since it would violate many GC invariants.
    120120
    121     if (!value == !slot->toJSValue() && slot->toJSValue().isCell() == value.isCell())
     121    if (!value == !*slot && slot->isCell() == value.isCell())
    122122        return;
    123123
     
    142142    Node* end = m_strongList.end();
    143143    for (Node* node = m_strongList.begin(); node != end; node = node->next()) {
    144         JSValue value = node->slot()->toJSValue();
     144        JSValue value = *node->slot();
    145145        if (value.isObject() && asObject(value.asCell())->isGlobalObject())
    146146            count++;
     
    155155        return false;
    156156
    157     JSValue value = node->slot()->toJSValue();
     157    JSValue value = *node->slot();
    158158    if (!value || !value.isCell())
    159159        return false;
  • trunk/Source/JavaScriptCore/heap/HandleHeap.h

    r84650 r84660  
    174174    Node* node = toNode(allocate());
    175175    node->makeWeak(toNode(other)->weakOwner(), toNode(other)->weakOwnerContext());
    176     writeBarrier(node->slot(), other->toJSValue());
    177     node->slot()->fromJSValue(other->toJSValue());
     176    writeBarrier(node->slot(), *other);
     177    *node->slot() = *other;
    178178    return toHandle(node);
    179179}
     
    185185
    186186    SentinelLinkedList<Node>::remove(node);
    187     if (!handle->toJSValue() || !handle->toJSValue().isCell()) {
     187    if (!*handle || !handle->isCell()) {
    188188        m_immediateList.push(node);
    189189        return;
     
    216216inline HandleSlot HandleHeap::Node::slot()
    217217{
    218     return reinterpret_cast<HandleSlot>(&m_value);
     218    return &m_value;
    219219}
    220220
  • trunk/Source/JavaScriptCore/heap/HandleStack.cpp

    r84650 r84660  
    4242void HandleStack::mark(HeapRootVisitor& heapRootMarker)
    4343{
    44     const Vector<JSValue*>& blocks = m_blockStack.blocks();
     44    const Vector<HandleSlot>& blocks = m_blockStack.blocks();
    4545    size_t blockLength = m_blockStack.blockLength;
    4646
    4747    int end = blocks.size() - 1;
    4848    for (int i = 0; i < end; ++i) {
    49         JSValue* block = blocks[i];
     49        HandleSlot block = blocks[i];
    5050        heapRootMarker.mark(block, blockLength);
    5151    }
    52     JSValue* block = blocks[end];
     52    HandleSlot block = blocks[end];
    5353    heapRootMarker.mark(block, m_frame.m_next - block);
    5454}
     
    5656void HandleStack::grow()
    5757{
    58     JSValue* block = m_blockStack.grow();
     58    HandleSlot block = m_blockStack.grow();
    5959    m_frame.m_next = block;
    6060    m_frame.m_end = block + m_blockStack.blockLength;
  • trunk/Source/JavaScriptCore/heap/HandleStack.h

    r84650 r84660  
    4242    class Frame {
    4343    public:
    44         JSValue* m_next;
    45         JSValue* m_end;
     44        HandleSlot m_next;
     45        HandleSlot m_end;
    4646    };
    4747
     
    8383    UNUSED_PARAM(lastFrame);
    8484#else
    85     const Vector<JSValue*>& blocks = m_blockStack.blocks();
     85    const Vector<HandleSlot>& blocks = m_blockStack.blocks();
    8686   
    8787    if (lastFrame.m_end != m_frame.m_end) { // Zapping to a frame in a different block.
     
    9292        }
    9393       
    94         for (JSValue* it = blocks[i] + m_blockStack.blockLength - 1; it != lastFrame.m_next - 1; --it)
     94        for (HandleSlot it = blocks[i] + m_blockStack.blockLength - 1; it != lastFrame.m_next - 1; --it)
    9595            *it = JSValue();
    9696       
     
    9898    }
    9999   
    100     for (JSValue* it = m_frame.m_next - 1; it != lastFrame.m_next - 1; --it)
     100    for (HandleSlot it = m_frame.m_next - 1; it != lastFrame.m_next - 1; --it)
    101101        *it = JSValue();
    102102#endif
     
    122122    if (m_frame.m_next == m_frame.m_end)
    123123        grow();
    124     return reinterpret_cast<HandleSlot>(m_frame.m_next++);
     124    return m_frame.m_next++;
    125125}
    126126
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r84650 r84660  
    364364    Node* end = m_strongList.end();
    365365    for (Node* node = m_strongList.begin(); node != end; node = node->next()) {
    366         JSValue value = node->slot()->toJSValue();
     366        JSValue value = *node->slot();
    367367        if (value && value.isCell())
    368368            typeCounter(value.asCell());
  • trunk/Source/JavaScriptCore/heap/Local.h

    r84650 r84660  
    9696    ASSERT(slot());
    9797    ASSERT(!HandleTypes<T>::toJSValue(externalType) || !HandleTypes<T>::toJSValue(externalType).isCell() || Heap::isMarked(HandleTypes<T>::toJSValue(externalType).asCell()));
    98     slot()->fromJSValue(externalType);
     98    *slot() = externalType;
    9999}
    100100
  • trunk/Source/JavaScriptCore/heap/Strong.h

    r84650 r84660  
    141141        JSValue value = HandleTypes<T>::toJSValue(externalType);
    142142        HandleHeap::heapFor(slot())->writeBarrier(slot(), value);
    143         slot()->fromJSValue(value);
     143        *slot() = value;
    144144    }
    145145};
  • trunk/Source/JavaScriptCore/heap/Weak.h

    r84650 r84660  
    132132        ASSERT(!value || !value.isCell() || Heap::isMarked(value.asCell()));
    133133        HandleHeap::heapFor(slot())->writeBarrier(slot(), value);
    134         slot()->fromJSValue(value);
     134        *slot() = value;
    135135    }
    136136};
  • trunk/Source/JavaScriptCore/runtime/StructureTransitionTable.h

    r84650 r84660  
    140140        ASSERT(isUsingSingleSlot());
    141141        if (HandleSlot slot = this->slot()) {
    142             if (slot->toJSValue())
    143                 return reinterpret_cast<Structure*>(slot->toJSValue().asCell());
     142            if (*slot)
     143                return reinterpret_cast<Structure*>(slot->asCell());
    144144        }
    145145        return 0;
     
    163163        }
    164164        HandleHeap::heapFor(slot)->writeBarrier(slot, reinterpret_cast<JSCell*>(structure));
    165         slot->fromJSValue(reinterpret_cast<JSCell*>(structure));
     165        *slot = reinterpret_cast<JSCell*>(structure);
    166166    }
    167167
  • trunk/Source/JavaScriptCore/runtime/WeakGCMap.h

    r84650 r84660  
    130130            HandleHeap::heapFor(slot)->makeWeak(slot, this, FinalizerCallback::finalizerContextFor(key));
    131131            HandleHeap::heapFor(slot)->writeBarrier(slot, value);
    132             slot->fromJSValue(value);
     132            *slot = value;
    133133        }
    134134        return iter;
     
    140140        ASSERT(slot);
    141141        HandleHeap::heapFor(slot)->writeBarrier(slot, value);
    142         slot->fromJSValue(value);
     142        *slot = value;
    143143    }
    144144
     
    153153        }
    154154        HandleHeap::heapFor(slot)->writeBarrier(slot, value);
    155         slot->fromJSValue(value);
     155        *slot = value;
    156156    }
    157157
  • trunk/Source/JavaScriptCore/runtime/WriteBarrier.h

    r84650 r84660  
    4242
    4343typedef enum { } Unknown;
    44 class OpaqueJSValue : private JSValue {
    45 public:
    46     JSValue& toJSValue() { return *this; }
    47     JSValue* toJSValueRef() { return this; }
    48     void fromJSValue(const JSValue& value) { *this = static_cast<const OpaqueJSValue&>(value); }
    49 };
    50 typedef OpaqueJSValue* HandleSlot;
     44typedef JSValue* HandleSlot;
    5145
    5246template <typename T> struct JSValueChecker {
Note: See TracChangeset for help on using the changeset viewer.