aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-06-06 16:19:47 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-07-19 14:50:02 +0000
commite0e50532d29d02c8bcbab01dbfb72377102eaf8f (patch)
tree93e320ee4db05727dffd3de51dd4a77019afe480 /src/qml/compiler/qv4compileddata_p.h
parentfa06494d888727d229cd47efbe7265d61c7f7c25 (diff)
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 <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r--src/qml/compiler/qv4compileddata_p.h3
1 files changed, 3 insertions, 0 deletions
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<QIODevice> 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
};