From e0e50532d29d02c8bcbab01dbfb72377102eaf8f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 6 Jun 2016 16:19:47 +0200 Subject: Added basic loading of compilation units from disk This remains hidden behind the QML_DISK_CACHE flag until all backends support it and the verification code is in place. Change-Id: Ic77c64e20a2dc4c43473c47640e09f8070237e85 Reviewed-by: Lars Knoll --- src/qml/compiler/qv4compileddata_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/compiler/qv4compileddata_p.h') diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index eef36f98e6..0f85460a08 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -845,6 +845,7 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public QQmlRefCount int listMetaTypeId; bool isRegisteredWithEngine; + QScopedPointer backingFile; // --- interface for QQmlPropertyCacheCreator typedef Object CompiledObject; @@ -877,11 +878,13 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public QQmlRefCount void destroy() Q_DECL_OVERRIDE; bool saveToDisk(QString *errorString); + bool loadFromDisk(const QUrl &url, QString *errorString); protected: virtual void linkBackendToEngine(QV4::ExecutionEngine *engine) = 0; virtual void prepareCodeOffsetsForDiskStorage(CompiledData::Unit *unit); virtual bool saveCodeToDisk(QIODevice *device, const CompiledData::Unit *unit, QString *errorString); + virtual bool memoryMapCode(QString *errorString); #endif // V4_BOOTSTRAP }; -- cgit v1.2.3