diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/runtime/JSSet.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSSet.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSSet.cpp | 54 |
1 files changed, 7 insertions, 47 deletions
diff --git a/Source/JavaScriptCore/runtime/JSSet.cpp b/Source/JavaScriptCore/runtime/JSSet.cpp index 46aaf3841..fdb6df548 100644 --- a/Source/JavaScriptCore/runtime/JSSet.cpp +++ b/Source/JavaScriptCore/runtime/JSSet.cpp @@ -26,65 +26,25 @@ #include "config.h" #include "JSSet.h" -#include "CopiedBlockInlines.h" #include "JSCJSValueInlines.h" -#include "JSSetIterator.h" -#include "MapDataInlines.h" +#include "MapData.h" #include "SlotVisitorInlines.h" -#include "StructureInlines.h" namespace JSC { -const ClassInfo JSSet::s_info = { "Set", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSet) }; - -void JSSet::destroy(JSCell* cell) -{ - JSSet* thisObject = jsCast<JSSet*>(cell); - thisObject->JSSet::~JSSet(); -} - -size_t JSSet::estimatedSize(JSCell* cell) -{ - JSSet* thisObject = jsCast<JSSet*>(cell); - size_t setDataSize = thisObject->m_setData.capacityInBytes(); - return Base::estimatedSize(cell) + setDataSize; -} +const ClassInfo JSSet::s_info = { "Set", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSSet) }; void JSSet::visitChildren(JSCell* cell, SlotVisitor& visitor) { Base::visitChildren(cell, visitor); - jsCast<JSSet*>(cell)->m_setData.visitChildren(cell, visitor); -} - -void JSSet::copyBackingStore(JSCell* cell, CopyVisitor& visitor, CopyToken token) -{ - Base::copyBackingStore(cell, visitor, token); - jsCast<JSSet*>(cell)->m_setData.copyBackingStore(visitor, token); -} - -bool JSSet::has(ExecState* exec, JSValue value) -{ - return m_setData.contains(exec, value); -} - -size_t JSSet::size(ExecState* exec) -{ - return m_setData.size(exec); -} - -void JSSet::add(ExecState* exec, JSValue value) -{ - m_setData.set(exec, this, value, value); -} - -void JSSet::clear(ExecState*) -{ - m_setData.clear(); + JSSet* thisObject = jsCast<JSSet*>(cell); + visitor.append(&thisObject->m_mapData); } -bool JSSet::remove(ExecState* exec, JSValue value) +void JSSet::finishCreation(VM& vm) { - return m_setData.remove(exec, value); + Base::finishCreation(vm); + m_mapData.set(vm, this, MapData::create(vm)); } } |