aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_masm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4isel_masm.cpp')
-rw-r--r--src/qml/compiler/qv4isel_masm.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
index a998e8b197..e0b79acb64 100644
--- a/src/qml/compiler/qv4isel_masm.cpp
+++ b/src/qml/compiler/qv4isel_masm.cpp
@@ -64,6 +64,11 @@ using namespace QQmlJS;
using namespace QQmlJS::MASM;
using namespace QV4;
+CompilationUnit::~CompilationUnit()
+{
+ UnwindHelper::deregisterFunctions(runtimeFunctions);
+}
+
QV4::Function *CompilationUnit::linkBackendToEngine(ExecutionEngine *engine)
{
QV4::Function *rootRuntimeFunction = 0;
@@ -78,14 +83,14 @@ QV4::Function *CompilationUnit::linkBackendToEngine(ExecutionEngine *engine)
(Value (*)(QV4::ExecutionContext *, const uchar *)) codeRefs[i].code().executableAddress(),
codeRefs[i].size());
- UnwindHelper::registerFunction(runtimeFunction);
-
if (compiledFunction == compiledRootFunction) {
assert(!rootRuntimeFunction);
rootRuntimeFunction = runtimeFunction;
}
}
+ UnwindHelper::registerFunctions(runtimeFunctions);
+
return rootRuntimeFunction;
}