aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v4/qv4unwindhelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/v4/qv4unwindhelper.cpp')
-rw-r--r--src/qml/qml/v4/qv4unwindhelper.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/qml/qml/v4/qv4unwindhelper.cpp b/src/qml/qml/v4/qv4unwindhelper.cpp
new file mode 100644
index 0000000000..0d8b21126e
--- /dev/null
+++ b/src/qml/qml/v4/qv4unwindhelper.cpp
@@ -0,0 +1,38 @@
+#include <qv4unwindhelper_p.h>
+
+#include <wtf/Platform.h>
+
+#if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X))
+# define USE_DW2_HELPER
+#elif CPU(X86) && OS(LINUX)
+# define USE_DW2_HELPER
+#elif CPU(ARM) && OS(LINUX)
+# define USE_ARM_HELPER
+#elif OS(WINDOWS)
+ // SJLJ will unwind on Windows
+# define USE_NULL_HELPER
+#elif OS(IOS)
+ // SJLJ will unwind on iOS
+# define USE_NULL_HELPER
+#else
+# warning "Unsupported/untested platform!"
+# define USE_NULL_HELPER
+#endif
+
+#ifdef USE_DW2_HELPER
+# include <qv4unwindhelper_p-dw2.h>
+#endif // USE_DW2_HELPER
+
+#ifdef USE_ARM_HELPER
+# include <qv4unwindhelper_p-arm.h>
+#endif // USE_ARM_HELPER
+
+#ifdef USE_NULL_HELPER
+using namespace QV4;
+void UnwindHelper::prepareForUnwind(ExecutionContext *) {}
+void UnwindHelper::registerFunction(Function *function) {Q_UNUSED(function);}
+void UnwindHelper::registerFunctions(const QVector<Function *> &functions) {Q_UNUSED(functions);}
+void UnwindHelper::deregisterFunction(Function *function) {Q_UNUSED(function);}
+void UnwindHelper::deregisterFunctions(const QVector<Function *> &functions) {Q_UNUSED(functions);}
+#endif // USE_NULL_HELPER
+