Changeset 84289 in webkit


Ignore:
Timestamp:
Apr 19, 2011 1:52:22 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-04-19 Oliver Hunt <oliver@apple.com>

Reviewed by Gavin Barraclough.

Remove DeprecatedPtr
https://bugs.webkit.org/show_bug.cgi?id=58718

Remove the class an all functions that still exist to support it.

  • heap/MarkStack.h: (JSC::MarkStack::append):
  • runtime/JSValue.h:
  • runtime/WriteBarrier.h:
Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r84264 r84289  
     12011-04-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Remove DeprecatedPtr
     6        https://bugs.webkit.org/show_bug.cgi?id=58718
     7
     8        Remove the class an all functions that still exist to support it.
     9
     10        * heap/MarkStack.h:
     11        (JSC::MarkStack::append):
     12        * runtime/JSValue.h:
     13        * runtime/WriteBarrier.h:
     14
    1152011-04-19  Jungshik Shin  <jshin@chromium.org>
    216
  • trunk/Source/JavaScriptCore/heap/MarkStack.h

    r84252 r84289  
    6565        void deprecatedAppend(Register*);
    6666        template <typename T> void append(WriteBarrierBase<T>*);
    67         template <typename T> void append(DeprecatedPtr<T>*);
    6867       
    6968        ALWAYS_INLINE void deprecatedAppendValues(Register* registers, size_t count, MarkSetProperties properties = NoNullValues)
     
    218217            return;
    219218        m_markSets.append(MarkSet(slot, slot + count, NoNullValues));
    220     }
    221 
    222     template <typename T> inline void MarkStack::append(DeprecatedPtr<T>* slot)
    223     {
    224         internalAppend(*slot->slot());
    225219    }
    226220   
  • trunk/Source/JavaScriptCore/runtime/JSValue.h

    r84252 r84289  
    5252    struct Instruction;
    5353
    54     template <class T> class DeprecatedPtr;
    5554    template <class T> class WriteBarrierBase;
    5655
     
    237236
    238237    private:
    239         template <class T> JSValue(DeprecatedPtr<T>);
    240238        template <class T> JSValue(WriteBarrierBase<T>);
    241239
  • trunk/Source/JavaScriptCore/runtime/WriteBarrier.h

    r84252 r84289  
    4343typedef enum { } Unknown;
    4444typedef JSValue* HandleSlot;
    45 
    46 // FIXME: Remove all uses of this class.
    47 template <class T> class DeprecatedPtr {
    48 public:
    49     DeprecatedPtr() : m_cell(0) { }
    50     DeprecatedPtr(T* cell) : m_cell(reinterpret_cast<JSCell*>(cell)) { }
    51     T* get() const { return reinterpret_cast<T*>(m_cell); }
    52     T* operator*() const { return static_cast<T*>(m_cell); }
    53     T* operator->() const { return static_cast<T*>(m_cell); }
    54    
    55     JSCell** slot() { return &m_cell; }
    56    
    57     typedef T* (DeprecatedPtr::*UnspecifiedBoolType);
    58     operator UnspecifiedBoolType*() const { return m_cell ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; }
    59 
    60     bool operator!() const { return !m_cell; }
    61 
    62 protected:
    63     JSCell* m_cell;
    64 };
    65 
    66 // FIXME: Remove all uses of this class.
    67 template <> class DeprecatedPtr<Unknown> {
    68 public:
    69     DeprecatedPtr() { }
    70     DeprecatedPtr(JSValue value) : m_value(value) { }
    71     DeprecatedPtr(JSCell* value) : m_value(value) { }
    72     const JSValue& get() const { return m_value; }
    73     const JSValue* operator*() const { return &m_value; }
    74     const JSValue* operator->() const { return &m_value; }
    75    
    76     JSValue* slot() { return &m_value; }
    77    
    78     typedef JSValue (DeprecatedPtr::*UnspecifiedBoolType);
    79     operator UnspecifiedBoolType*() const { return m_value ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; }
    80     bool operator!() const { return !m_value; }
    81    
    82 private:
    83     JSValue m_value;
    84 };
    85 
    86 template <typename U, typename V> inline bool operator==(const DeprecatedPtr<U>& lhs, const DeprecatedPtr<V>& rhs)
    87 {
    88     return lhs.get() == rhs.get();
    89 }
    9045
    9146template <typename T> struct JSValueChecker {
Note: See TracChangeset for help on using the changeset viewer.