diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/parser/ParserArena.cpp | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/parser/ParserArena.cpp')
-rw-r--r-- | Source/JavaScriptCore/parser/ParserArena.cpp | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/Source/JavaScriptCore/parser/ParserArena.cpp b/Source/JavaScriptCore/parser/ParserArena.cpp index c53f30753..a27688770 100644 --- a/Source/JavaScriptCore/parser/ParserArena.cpp +++ b/Source/JavaScriptCore/parser/ParserArena.cpp @@ -27,7 +27,7 @@ #include "ParserArena.h" #include "Nodes.h" -#include <wtf/PassOwnPtr.h> +#include "JSCInlines.h" namespace JSC { @@ -62,38 +62,6 @@ ParserArena::~ParserArena() deallocateObjects(); } -bool ParserArena::contains(ParserArenaRefCounted* object) const -{ - return m_refCountedObjects.find(object) != notFound; -} - -ParserArenaRefCounted* ParserArena::last() const -{ - return m_refCountedObjects.last().get(); -} - -void ParserArena::removeLast() -{ - m_refCountedObjects.removeLast(); -} - -void ParserArena::reset() -{ - // Since this code path is used only when parsing fails, it's not bothering to reuse - // any of the memory the arena allocated. We could improve that later if we want to - // efficiently reuse the same arena. - - deallocateObjects(); - - m_freeableMemory = 0; - m_freeablePoolEnd = 0; - if (m_identifierArena) - m_identifierArena->clear(); - m_freeablePools.clear(); - m_deletableObjects.clear(); - m_refCountedObjects.clear(); -} - void ParserArena::allocateFreeablePool() { if (m_freeablePoolEnd) @@ -105,18 +73,4 @@ void ParserArena::allocateFreeablePool() ASSERT(freeablePool() == pool); } -bool ParserArena::isEmpty() const -{ - return !m_freeablePoolEnd - && (!m_identifierArena || m_identifierArena->isEmpty()) - && m_freeablePools.isEmpty() - && m_deletableObjects.isEmpty() - && m_refCountedObjects.isEmpty(); -} - -void ParserArena::derefWithArena(PassRefPtr<ParserArenaRefCounted> object) -{ - m_refCountedObjects.append(object); -} - } |