Changeset 58712 in webkit for trunk/JavaScriptCore/wtf/WTFThreadData.h
- Timestamp:
- May 3, 2010, 4:03:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/WTFThreadData.h
r58114 r58712 28 28 #define WTFThreadData_h 29 29 30 #include <wtf/HashMap.h> 31 #include <wtf/HashSet.h> 30 32 #include <wtf/Noncopyable.h> 33 #include <wtf/text/StringHash.h> 31 34 32 35 // This was ENABLE(WORKERS) in WebCore, but this is not defined when compiling JSC. … … 44 47 45 48 // 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.51 49 namespace WebCore { 52 50 class AtomicStringTable; 51 class StringImpl; 53 52 } 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 #endif 54 82 55 83 namespace WTF { … … 60 88 ~WTFThreadData(); 61 89 62 WebCore::AtomicStringTable &atomicStringTable()90 WebCore::AtomicStringTable* atomicStringTable() 63 91 { 64 return *m_atomicStringTable;92 return m_atomicStringTable; 65 93 } 66 94 … … 92 120 private: 93 121 WebCore::AtomicStringTable* m_atomicStringTable; 122 AtomicStringTableDestructor m_atomicStringTableDestructor; 94 123 95 124 #if USE(JSC) … … 104 133 #endif 105 134 friend WTFThreadData& wtfThreadData(); 135 friend class WebCore::AtomicStringTable; 106 136 }; 107 137
Note:
See TracChangeset
for help on using the changeset viewer.