From a8b3536d6e5e7eb1c51fb20df071185dbce317a2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 8 May 2019 13:29:50 +0200 Subject: Move compileModule() into qv4codegen.cpp This is a better fit for the method. In turn, remove all the V4_BOOTSTRAP conditions from qv4engine_p.h and make sure we don't include or compile it in bootstrap mode. Change-Id: I5933b0724e561313ca20c420b83e4d70e63bddf5 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine_p.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/qml/jsruntime/qv4engine_p.h') diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index d0c58eee8f..4ce854bc52 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -58,11 +58,9 @@ #include #include -#ifndef V4_BOOTSTRAP -# include "qv4function_p.h" -# include -# include -#endif +#include "qv4function_p.h" +#include +#include namespace WTF { class BumpPointerAllocator; @@ -128,13 +126,8 @@ public: Function *globalCode; -#ifdef V4_BOOTSTRAP - QJSEngine *jsEngine() const; - QQmlEngine *qmlEngine() const; -#else // !V4_BOOTSTRAP QJSEngine *jsEngine() const { return publicEngine; } QQmlEngine *qmlEngine() const { return v8Engine ? v8Engine->engine() : nullptr; } -#endif // V4_BOOTSTRAP QV8Engine *v8Engine; QJSEngine *publicEngine; @@ -438,9 +431,7 @@ public: Symbol *symbol_unscopables() const { return reinterpret_cast(jsSymbols + Symbol_unscopables); } Symbol *symbol_revokableProxy() const { return reinterpret_cast(jsSymbols + Symbol_revokableProxy); } -#ifndef V4_BOOTSTRAP QIntrusiveList compilationUnits; -#endif quint32 m_engineId; @@ -611,8 +602,6 @@ public: double localTZA = 0.0; // local timezone, initialized at startup - static QQmlRefPointer compileModule(bool debugMode, const QString &url, const QString &sourceCode, const QDateTime &sourceTimeStamp, QList *diagnostics); -#ifndef V4_BOOTSTRAP QQmlRefPointer compileModule(const QUrl &url); QQmlRefPointer compileModule(const QUrl &url, const QString &sourceCode, const QDateTime &sourceTimeStamp); @@ -621,7 +610,6 @@ public: void injectModule(const QQmlRefPointer &moduleUnit); QQmlRefPointer moduleForUrl(const QUrl &_url, const CompiledData::CompilationUnit *referrer = nullptr) const; QQmlRefPointer loadModule(const QUrl &_url, const CompiledData::CompilationUnit *referrer = nullptr); -#endif private: #if QT_CONFIG(qml_debug) -- cgit v1.2.3