Ignore:
Timestamp:
May 10, 2011, 7:29:51 PM (14 years ago)
Author:
[email protected]
Message:

2011-05-10 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.

Fixed up some #include dependencies so the WriteBarrier class can actually call Heap::writeBarrier
https://bugs.webkit.org/show_bug.cgi?id=60532

  • heap/Handle.h: Moved HandleTypes to its own header because that's the WebKit style, and it was necessary to resolve a circular dependency between Handle.h and WriteBarrier.h.
  • heap/Heap.h: (JSC::Heap::writeBarrier): Added an inline no-op writeBarrier(), to verify that all the code is in the right place.
  • heap/MarkStack.h: Moved WriteBarrier operations to WriteBarrier.h to resolve a circular dependency.
  • runtime/ArgList.h:
  • runtime/JSCell.h: #include WriteBarrier.h since we don't get it for free anymore.
  • runtime/PropertyMapHashTable.h: (JSC::PropertyTable::PropertyTable): Call the real writeBarrier() function, now that it exists.
  • runtime/SmallStrings.h: Removed a stray #include to resolve a circular dependency.
  • runtime/WriteBarrier.h: (JSC::WriteBarrierBase::set): (JSC::MarkStack::append): (JSC::MarkStack::appendValues): Updated to match the changes above.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Handle.h

    r84660 r86209  
    2727#define Handle_h
    2828
    29 #include "WriteBarrier.h"
    30 #include <wtf/Assertions.h>
     29#include "HandleTypes.h"
    3130
    3231namespace JSC {
     
    7675private:
    7776    HandleSlot m_slot;
    78 };
    79 
    80 template <typename T> struct HandleTypes {
    81     typedef T* ExternalType;
    82     static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(slot->asCell()) : 0; }
    83     static JSValue toJSValue(T* cell) { return reinterpret_cast<JSCell*>(cell); }
    84     template <typename U> static void validateUpcast() { T* temp; temp = (U*)0; }
    85 };
    86 
    87 template <> struct HandleTypes<Unknown> {
    88     typedef JSValue ExternalType;
    89     static ExternalType getFromSlot(HandleSlot slot) { return slot ? *slot : JSValue(); }
    90     static JSValue toJSValue(const JSValue& v) { return v; }
    91     template <typename U> static void validateUpcast() {}
    9277};
    9378
Note: See TracChangeset for help on using the changeset viewer.