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/MarkStack.h

    r77151 r80985  
    2727#define MarkStack_h
    2828
     29#include "ConservativeSet.h"
    2930#include "JSValue.h"
    3031#include "WriteBarrier.h"
     
    7273        }
    7374
     75        void append(ConservativeSet& conservativeSet)
     76        {
     77            JSCell** set = conservativeSet.set();
     78            size_t size = conservativeSet.size();
     79            for (size_t i = 0; i < size; ++i)
     80                internalAppend(set[i]);
     81        }
     82
    7483        inline void drain();
    7584        void compact();
Note: See TracChangeset for help on using the changeset viewer.