Ignore:
Timestamp:
Apr 21, 2010, 12:40:20 PM (15 years ago)
Author:
[email protected]
Message:
  • API/JSValueRef.cpp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • runtime/Identifier.cpp:

(JSC::IdentifierTable::~IdentifierTable):
(JSC::IdentifierTable::add):

  • runtime/Identifier.h:
  • wtf/WTFThreadData.h:

(JSC::IdentifierTable::remove):
(JSC::IdentifierTable::literalTable):

  • wtf/text/StringImpl.cpp:

(WebCore::StringImpl::~StringImpl):

Reviewed by NOBODY (windows build fix).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/WTFThreadData.h

    r57879 r58003  
    3131#include <wtf/HashSet.h>
    3232#include <wtf/Noncopyable.h>
     33#include <wtf/text/StringHash.h>
    3334
    3435// This was ENABLE(WORKERS) in WebCore, but this is not defined when compiling JSC.
     
    4647
    4748// FIXME: This is a temporary layering violation while we move more string code to WTF.
    48 namespace JSC {
    49 class IdentifierTable;
    50 }
    51 
    52 // FIXME: This is a temporary layering violation while we move more string code to WTF.
    5349namespace WebCore {
    5450class AtomicStringTable;
     51class StringImpl;
    5552}
     53using WebCore::StringImpl;
    5654
    5755typedef void (*AtomicStringTableDestructor)(WebCore::AtomicStringTable*);
     56
     57#if USE(JSC)
     58// FIXME: This is a temporary layering violation while we move more string code to WTF.
     59namespace JSC {
     60
     61typedef HashMap<const char*, RefPtr<StringImpl>, PtrHash<const char*> > LiteralIdentifierTable;
     62
     63class IdentifierTable : public FastAllocBase {
     64public:
     65    ~IdentifierTable();
     66
     67    std::pair<HashSet<StringImpl*>::iterator, bool> add(StringImpl* value);
     68    template<typename U, typename V>
     69    std::pair<HashSet<StringImpl*>::iterator, bool> add(U value);
     70
     71    void remove(StringImpl* r) { m_table.remove(r); }
     72
     73    LiteralIdentifierTable& literalTable() { return m_literalTable; }
     74
     75private:
     76    HashSet<StringImpl*> m_table;
     77    LiteralIdentifierTable m_literalTable;
     78};
     79
     80}
     81#endif
    5882
    5983namespace WTF {
Note: See TracChangeset for help on using the changeset viewer.