From 9f8c2e733202ea2bcfbc6182fe1e994b140f449a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 19 Apr 2013 11:47:50 +0200 Subject: [PATCH] Remove wtf dependencies from the v4 headers Change-Id: I94a326a333067657319a8edeff76b3411c66856d Reviewed-by: Simon Hausmann --- src/qml/qml/v4vm/qv4engine.cpp | 2 ++ src/qml/qml/v4vm/qv4engine_p.h | 6 ++++-- src/qml/qml/v4vm/qv4regexp.cpp | 2 +- src/qml/qml/v4vm/qv4regexpobject_p.h | 3 ++- src/qml/qml/v4vm/qv4runtime_p.h | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qml/qml/v4vm/qv4engine.cpp b/src/qml/qml/v4vm/qv4engine.cpp index a81b492..cd0a16b 100644 --- a/src/qml/qml/v4vm/qv4engine.cpp +++ b/src/qml/qml/v4vm/qv4engine.cpp @@ -68,6 +68,7 @@ namespace VM { ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) : memoryManager(new QQmlJS::VM::MemoryManager) , executableAllocator(new QQmlJS::VM::ExecutableAllocator) + , bumperPointerAllocator(new WTF::BumpPointerAllocator) , debugger(0) , globalObject(0) , globalCode(0) @@ -237,6 +238,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) ExecutionEngine::~ExecutionEngine() { + delete bumperPointerAllocator; delete regExpCache; UnwindHelper::deregisterFunctions(functions); qDeleteAll(functions); diff --git a/src/qml/qml/v4vm/qv4engine_p.h b/src/qml/qml/v4vm/qv4engine_p.h index 7777ca5..0046665 100644 --- a/src/qml/qml/v4vm/qv4engine_p.h +++ b/src/qml/qml/v4vm/qv4engine_p.h @@ -49,7 +49,9 @@ #include "qv4property_p.h" #include -#include +namespace WTF { +class BumpPointerAllocator; +} QT_BEGIN_NAMESPACE @@ -115,7 +117,7 @@ struct Q_QML_EXPORT ExecutionEngine ExecutionContext *current; GlobalContext *rootContext; - WTF::BumpPointerAllocator bumperPointerAllocator; // Used by Yarr Regex engine. + WTF::BumpPointerAllocator *bumperPointerAllocator; // Used by Yarr Regex engine. Identifiers *identifierCache; diff --git a/src/qml/qml/v4vm/qv4regexp.cpp b/src/qml/qml/v4vm/qv4regexp.cpp index 0ca3ae9..4ad04b9 100644 --- a/src/qml/qml/v4vm/qv4regexp.cpp +++ b/src/qml/qml/v4vm/qv4regexp.cpp @@ -109,7 +109,7 @@ RegExp::RegExp(ExecutionEngine* engine, const QString &pattern, bool ignoreCase, if (error) return; m_subPatternCount = yarrPattern.m_numSubpatterns; - m_byteCode = JSC::Yarr::byteCompile(yarrPattern, &engine->bumperPointerAllocator); + m_byteCode = JSC::Yarr::byteCompile(yarrPattern, engine->bumperPointerAllocator); #if ENABLE(YARR_JIT) if (!yarrPattern.m_containsBackreferences) { JSC::JSGlobalData dummy(engine->executableAllocator); diff --git a/src/qml/qml/v4vm/qv4regexpobject_p.h b/src/qml/qml/v4vm/qv4regexpobject_p.h index af30027..4c2e290 100644 --- a/src/qml/qml/v4vm/qv4regexpobject_p.h +++ b/src/qml/qml/v4vm/qv4regexpobject_p.h @@ -51,7 +51,6 @@ #include "qv4managed_p.h" #include "qv4property_p.h" #include "qv4objectiterator_p.h" -#include "qv4regexp_p.h" #include #include @@ -64,6 +63,8 @@ QT_BEGIN_NAMESPACE namespace QQmlJS { namespace VM { +struct RegExp; + struct RegExpObject: Object { RegExp* value; Property *lastIndexProperty(ExecutionContext *ctx); diff --git a/src/qml/qml/v4vm/qv4runtime_p.h b/src/qml/qml/v4vm/qv4runtime_p.h index b4cd826..c718efc 100644 --- a/src/qml/qml/v4vm/qv4runtime_p.h +++ b/src/qml/qml/v4vm/qv4runtime_p.h @@ -53,7 +53,7 @@ #include #include -#include +//#include #ifdef DO_TRACE_INSTR # define TRACE1(x) fprintf(stderr, " %s\n", __FUNCTION__); -- 2.7.4