From 7f7d87c68da4cb29b2b2b9c324c6863228da0c26 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 7 May 2019 12:47:33 +0200 Subject: Split CompiledData::CompilationUnit in two We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine_p.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 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 0d113754c0..f8ac0e0268 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -64,6 +64,7 @@ #include "qv4function_p.h" #include +#include namespace WTF { class BumpPointerAllocator; @@ -489,7 +490,7 @@ public: Symbol *symbol_unscopables() const { return reinterpret_cast(jsSymbols + Symbol_unscopables); } Symbol *symbol_revokableProxy() const { return reinterpret_cast(jsSymbols + Symbol_revokableProxy); } - QIntrusiveList compilationUnits; + QIntrusiveList compilationUnits; quint32 m_engineId; @@ -698,14 +699,15 @@ public: double localTZA = 0.0; // local timezone, initialized at startup - QQmlRefPointer compileModule(const QUrl &url); - QQmlRefPointer compileModule(const QUrl &url, const QString &sourceCode, const QDateTime &sourceTimeStamp); + QQmlRefPointer compileModule(const QUrl &url); + QQmlRefPointer compileModule( + const QUrl &url, const QString &sourceCode, const QDateTime &sourceTimeStamp); mutable QMutex moduleMutex; - QHash> modules; - 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); + QHash> modules; + void injectModule(const QQmlRefPointer &moduleUnit); + QQmlRefPointer moduleForUrl(const QUrl &_url, const ExecutableCompilationUnit *referrer = nullptr) const; + QQmlRefPointer loadModule(const QUrl &_url, const ExecutableCompilationUnit *referrer = nullptr); private: #if QT_CONFIG(qml_debug) -- cgit v1.2.3