Ignore:
Timestamp:
Mar 13, 2011, 6:16:15 PM (14 years ago)
Author:
[email protected]
Message:

2011-03-13 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.

Removed another case of DeprecatedPtr (ConservativeSet)
https://bugs.webkit.org/show_bug.cgi?id=56281


The ConservativeSet is an internal data structure used during marking,
so direct pointers are fine.

  • runtime/ConservativeSet.cpp: (JSC::ConservativeSet::grow):
  • runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append. (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated the size of the set based on sizeof(DeprecatedPtr<T>*) instead of sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not. (JSC::ConservativeSet::size): (JSC::ConservativeSet::set): Use direct pointers, as stated above.
  • runtime/Heap.cpp: (JSC::Heap::markRoots):
  • runtime/MarkStack.h: (JSC::MarkStack::append): Created a special case of append for ConservativeSet. I didn't want to add back a generic "append JSCell*" function, since other class might start using that wrong. (In the end, this function might go away, since the Heap will want to do something slightly more interesting with the conservative set, but this is OK for now.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/ConservativeSet.cpp

    r77151 r80985  
    2727#include "ConservativeSet.h"
    2828
     29#include "Heap.h"
     30
    2931namespace JSC {
    3032
     
    3739{
    3840    size_t newCapacity = m_capacity == inlineCapacity ? nonInlineCapacity : m_capacity * 2;
    39     DeprecatedPtr<JSCell>* newSet = static_cast<DeprecatedPtr<JSCell>*>(OSAllocator::reserveAndCommit(newCapacity * sizeof(JSCell*)));
     41    JSCell** newSet = static_cast<JSCell**>(OSAllocator::reserveAndCommit(newCapacity * sizeof(JSCell*)));
    4042    memcpy(newSet, m_set, m_size * sizeof(JSCell*));
    4143    if (m_set != m_inlineSet)
Note: See TracChangeset for help on using the changeset viewer.