From 284837daa07b29d6a63a748544a90b1f5842ac5c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 10 Sep 2012 19:10:20 +0200 Subject: Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073) New snapshot --- Source/JavaScriptCore/runtime/SymbolTable.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'Source/JavaScriptCore/runtime/SymbolTable.h') 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 #include +#include namespace JSC { @@ -325,12 +325,28 @@ namespace JSC { typedef HashMap, SymbolTableEntry, IdentifierRepHash, HashTraits >, SymbolTableIndexHashTraits> SymbolTable; - class SharedSymbolTable : public SymbolTable, public RefCounted { - WTF_MAKE_FAST_ALLOCATED; + class SharedSymbolTable : public JSCell, public SymbolTable { public: - static PassRefPtr create() { return adoptRef(new SharedSymbolTable); } + static SharedSymbolTable* create(JSGlobalData& globalData) + { + SharedSymbolTable* sharedSymbolTable = new (NotNull, allocateCell(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 -- cgit v1.2.1