aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-29 13:12:17 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-30 08:09:13 +0000
commit260a24800dcdf3fa6ad4a8d0abaa0c8b23aae511 (patch)
tree7382fd5a6f00ffd05ae45a86e803d7454d070ad3 /src/qml/compiler/qv4compileddata.cpp
parente931b123e90ca0162e112148de5cd35f149e4841 (diff)
Remove the codeRefs in the Moth::CompilationUnit
There's no point in allocating that vector of byte arrays, if we can directly embed those int the CompiledData and reference it from there. Change-Id: I8fc92b1efaca5a9646f40fc84a2ac4191c8f3444 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index fa0c222397..3f6f9f12b6 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -387,21 +387,12 @@ bool CompilationUnit::loadFromDisk(const QUrl &url, const QDateTime &sourceTimeS
}
}
- if (!memoryMapCode(errorString))
- return false;
-
dataPtrChange.commit();
free(const_cast<Unit*>(oldDataPtr));
backingFile.reset(cacheFile.take());
return true;
}
-bool CompilationUnit::memoryMapCode(QString *errorString)
-{
- *errorString = QStringLiteral("Missing code mapping backend");
- return false;
-}
-
#endif // V4_BOOTSTRAP
#if defined(V4_BOOTSTRAP)
@@ -441,17 +432,12 @@ bool CompilationUnit::saveToDisk(const QUrl &unitUrl, QString *errorString)
memcpy(&unitPtr, &dataPtr, sizeof(unitPtr));
unitPtr->flags |= Unit::StaticData;
- prepareCodeOffsetsForDiskStorage(unitPtr);
-
qint64 headerWritten = cacheFile.write(modifiedUnit);
if (headerWritten != modifiedUnit.size()) {
*errorString = cacheFile.errorString();
return false;
}
- if (!saveCodeToDisk(&cacheFile, unitPtr, errorString))
- return false;
-
if (!cacheFile.commit()) {
*errorString = cacheFile.errorString();
return false;
@@ -465,19 +451,6 @@ bool CompilationUnit::saveToDisk(const QUrl &unitUrl, QString *errorString)
#endif // QT_CONFIG(temporaryfile)
}
-void CompilationUnit::prepareCodeOffsetsForDiskStorage(Unit *unit)
-{
- Q_UNUSED(unit);
-}
-
-bool CompilationUnit::saveCodeToDisk(QIODevice *device, const Unit *unit, QString *errorString)
-{
- Q_UNUSED(device);
- Q_UNUSED(unit);
- *errorString = QStringLiteral("Saving code to disk is not supported in this configuration");
- return false;
-}
-
Unit *CompilationUnit::createUnitData(QmlIR::Document *irDocument)
{
if (!irDocument->javaScriptCompilationUnit->data)