From: Lars Knoll Date: Fri, 19 Apr 2013 09:47:50 +0000 (+0200) Subject: Remove wtf dependencies from the v4 headers X-Git-Tag: upstream/5.2.1~669^2~630 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f8c2e733202ea2bcfbc6182fe1e994b140f449a;p=platform%2Fupstream%2Fqtdeclarative.git Remove wtf dependencies from the v4 headers Change-Id: I94a326a333067657319a8edeff76b3411c66856d Reviewed-by: Simon Hausmann --- 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__);