summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/SymbolTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/SymbolTable.h')
-rw-r--r--Source/JavaScriptCore/runtime/SymbolTable.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/runtime/SymbolTable.h b/Source/JavaScriptCore/runtime/SymbolTable.h
index 8b017efbc..08ea8c163 100644
--- a/Source/JavaScriptCore/runtime/SymbolTable.h
+++ b/Source/JavaScriptCore/runtime/SymbolTable.h
@@ -30,10 +30,10 @@
#define SymbolTable_h
#include "JSObject.h"
-#include "UString.h"
#include "Watchpoint.h"
#include <wtf/AlwaysInline.h>
#include <wtf/HashTraits.h>
+#include <wtf/text/StringImpl.h>
namespace JSC {
@@ -325,12 +325,28 @@ namespace JSC {
typedef HashMap<RefPtr<StringImpl>, SymbolTableEntry, IdentifierRepHash, HashTraits<RefPtr<StringImpl> >, SymbolTableIndexHashTraits> SymbolTable;
- class SharedSymbolTable : public SymbolTable, public RefCounted<SharedSymbolTable> {
- WTF_MAKE_FAST_ALLOCATED;
+ class SharedSymbolTable : public JSCell, public SymbolTable {
public:
- static PassRefPtr<SharedSymbolTable> create() { return adoptRef(new SharedSymbolTable); }
+ static SharedSymbolTable* create(JSGlobalData& globalData)
+ {
+ SharedSymbolTable* sharedSymbolTable = new (NotNull, allocateCell<SharedSymbolTable>(globalData.heap)) SharedSymbolTable(globalData);
+ sharedSymbolTable->finishCreation(globalData);
+ return sharedSymbolTable;
+ }
+ static void destroy(JSCell*);
+
+ static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
+ {
+ return Structure::create(globalData, globalObject, prototype, TypeInfo(LeafType, StructureFlags), &s_info);
+ }
+
+ static JS_EXPORTDATA const ClassInfo s_info;
+
private:
- SharedSymbolTable() { }
+ SharedSymbolTable(JSGlobalData& globalData)
+ : JSCell(globalData, globalData.sharedSymbolTableStructure.get())
+ {
+ }
};
} // namespace JSC