Changeset 58114 in webkit for trunk/JavaScriptCore/wtf/WTFThreadData.h
- Timestamp:
- Apr 22, 2010, 1:31:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/WTFThreadData.h
r58003 r58114 28 28 #define WTFThreadData_h 29 29 30 #include <wtf/HashMap.h>31 #include <wtf/HashSet.h>32 30 #include <wtf/Noncopyable.h> 33 #include <wtf/text/StringHash.h>34 31 35 32 // This was ENABLE(WORKERS) in WebCore, but this is not defined when compiling JSC. … … 47 44 48 45 // FIXME: This is a temporary layering violation while we move more string code to WTF. 46 namespace JSC { 47 class IdentifierTable; 48 } 49 50 // FIXME: This is a temporary layering violation while we move more string code to WTF. 49 51 namespace WebCore { 50 52 class AtomicStringTable; 51 class StringImpl;52 53 } 53 using WebCore::StringImpl;54 55 typedef 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.59 namespace JSC {60 61 typedef HashMap<const char*, RefPtr<StringImpl>, PtrHash<const char*> > LiteralIdentifierTable;62 63 class IdentifierTable : public FastAllocBase {64 public: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 75 private:76 HashSet<StringImpl*> m_table;77 LiteralIdentifierTable m_literalTable;78 };79 80 }81 #endif82 54 83 55 namespace WTF { … … 88 60 ~WTFThreadData(); 89 61 90 WebCore::AtomicStringTable *atomicStringTable()62 WebCore::AtomicStringTable& atomicStringTable() 91 63 { 92 return m_atomicStringTable;64 return *m_atomicStringTable; 93 65 } 94 66 … … 120 92 private: 121 93 WebCore::AtomicStringTable* m_atomicStringTable; 122 AtomicStringTableDestructor m_atomicStringTableDestructor;123 94 124 95 #if USE(JSC) … … 133 104 #endif 134 105 friend WTFThreadData& wtfThreadData(); 135 friend class WebCore::AtomicStringTable;136 106 }; 137 107
Note:
See TracChangeset
for help on using the changeset viewer.