From 6882a04fb36642862b11efe514251d32070c3d65 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Thu, 25 Aug 2016 19:20:41 +0300 Subject: Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443) Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev --- Source/JavaScriptCore/parser/ParserArena.cpp | 48 +--------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) (limited to 'Source/JavaScriptCore/parser/ParserArena.cpp') 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 +#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 object) -{ - m_refCountedObjects.append(object); -} - } -- cgit v1.2.1