aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-06-14 13:58:36 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-06-24 11:13:08 +0200
commit4d9ffeff745a4a8bd31df7af85058d38383c5286 (patch)
tree0ca1f6cdeca65d371924cf628e86bacff2113020
parente9de399dda27e4f8e8a2763b574c9fafaf2a5469 (diff)
Inline CompiledData::unlink() into the only caller
The compiler never links anything and therefore it doesn't need to unlink, either. Change-Id: I9ccdc012f9333abc5f4b60174b794e490772e1fd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/qml/compiler/qv4compileddata.cpp10
-rw-r--r--src/qml/compiler/qv4compileddata_p.h2
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit.cpp7
3 files changed, 6 insertions, 13 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index e548085873..ee53ca1586 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -150,16 +150,6 @@ QString Binding::escapedString(const QString &string)
return tmp;
}
-void CompilationUnit::unlink()
-{
- free(runtimeStrings);
- runtimeStrings = nullptr;
- delete [] runtimeRegularExpressions;
- runtimeRegularExpressions = nullptr;
- free(runtimeClasses);
- runtimeClasses = nullptr;
-}
-
}
}
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index b8ae2536dc..1db23fc755 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -1136,8 +1136,6 @@ public:
Heap::Module *module() const { return m_module; }
void setModule(Heap::Module *module) { m_module = module; }
- void unlink();
-
private:
QString m_fileName; // initialized from data->sourceFileIndex
QString m_finalUrlString; // initialized from data->finalUrlIndex
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp
index 86fd2e9171..39f4a0a129 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit.cpp
+++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp
@@ -323,7 +323,12 @@ void ExecutableCompilationUnit::unlink()
f->destroy();
runtimeFunctions.clear();
- CompiledData::CompilationUnit::unlink();
+ free(runtimeStrings);
+ runtimeStrings = nullptr;
+ delete [] runtimeRegularExpressions;
+ runtimeRegularExpressions = nullptr;
+ free(runtimeClasses);
+ runtimeClasses = nullptr;
}
void ExecutableCompilationUnit::markObjects(QV4::MarkStack *markStack)