diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-24 08:49:35 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-29 10:39:06 +0100 |
commit | c4dcc327d96788d4d0cd91303b3f1270dd3efd0a (patch) | |
tree | 383b57195ee4e41621881a788611b2979d6c145e /src/qml | |
parent | 25fbdfc66fa995bfe633b3c31d635045f7cf66dd (diff) |
Cleanup: Remove now unused throwInternal() method
This method was throwing a C++ exception in the old exception
handling and is not needed anymore.
Change-Id: If67696cdbd260225ae60720a1035941fe7e1e650
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/jsruntime.pri | 25 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 10 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_cxxabi.cpp | 156 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 4 |
4 files changed, 0 insertions, 195 deletions
diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri index cde26c323d..6310c27988 100644 --- a/src/qml/jsruntime/jsruntime.pri +++ b/src/qml/jsruntime/jsruntime.pri @@ -104,31 +104,6 @@ linux-g++*:isEqual(QT_ARCH,i386) { QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse } -linux*|mac { - LIBS += -ldl -} - -!win32:!ios:!mac { - *g++*:equals(QT_ARCH, "arm") { - static_libgcc = $$system($$QMAKE_CXX -print-file-name=libgcc.a) - LIBS += $$static_libgcc - } - SOURCES += $$PWD/qv4engine_cxxabi.cpp - DEFINES += V4_CXX_ABI_EXCEPTION -} - -debug-with-libunwind { - UW_INC=$$(LIBUNWIND_INCLUDES) - isEmpty(UW_INC): error("Please set LIBUNWIND_INCLUDES") - INCLUDEPATH += $$UW_INC - UW_LIBS=$$(LIBUNWIND_LIBS) - isEmpty(UW_LIBS): error("Please set LIBUNWIND_LIBS") - LIBS += -L$$UW_LIBS - equals(QT_ARCH, arm): LIBS += -lunwind-arm - LIBS += -lunwind-dwarf-common -lunwind-dwarf-local -lunwind-elf32 -lunwind - DEFINES += WTF_USE_LIBUNWIND_DEBUG=1 -} - valgrind { DEFINES += V4_USE_VALGRIND } diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index bb11011669..4e7beb51c1 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -866,14 +866,4 @@ QQmlError ExecutionEngine::catchExceptionAsQmlError(ExecutionContext *context) return error; } -#if !defined(V4_CXX_ABI_EXCEPTION) -struct DummyException -{}; - -void ExecutionEngine::throwInternal() -{ - throw DummyException(); -} -#endif - QT_END_NAMESPACE diff --git a/src/qml/jsruntime/qv4engine_cxxabi.cpp b/src/qml/jsruntime/qv4engine_cxxabi.cpp deleted file mode 100644 index f29af5a284..0000000000 --- a/src/qml/jsruntime/qv4engine_cxxabi.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "qv4engine_p.h" - -#if defined(V4_CXX_ABI_EXCEPTION) - -// On arm we link libgcc statically and want to avoid exporting the _Unwind* symbols -#if defined(Q_PROCESSOR_ARM) -#define HIDE_EXPORTS -#endif - -#include <unwind.h> -#include <exception> - -namespace { - -// 2.1.1 from http://mentorembedded.github.io/cxx-abi/abi-eh.html -struct cxa_exception { - std::type_info *typeInfo; - void (*exceptionDestructor)(void*); - std::unexpected_handler unexpectedHandler; - std::terminate_handler terminateHandler; - cxa_exception *nextException; - int handlerCount; -#ifdef __ARM_EABI_UNWINDER__ - cxa_exception *nextPropagatingException; - int propagationCount; -#else - int handlerSwitchValue; - const char *actionRecord; - const char *languageSpecificData; - void *catchTemp; - void *adjustedPtr; -#endif - _Unwind_Exception unwindHeader; -}; - -struct cxa_eh_globals -{ - cxa_exception *caughtExceptions; - unsigned int uncaughtExceptions; -#ifdef __ARM_EABI_UNWINDER__ - cxa_exception* propagatingExceptions; -#endif -}; - -} - -extern "C" cxa_eh_globals *__cxa_get_globals(); - -static void exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception *ex) -{ - free(ex); -} - -QT_BEGIN_NAMESPACE - -using namespace QV4; - -void ExecutionEngine::throwInternal() -{ - _Unwind_Exception *exception = (_Unwind_Exception*)malloc(sizeof(_Unwind_Exception)); - memset(exception, 0, sizeof(*exception)); - exception->exception_cleanup = &exception_cleanup; - -#ifdef __ARM_EABI_UNWINDER__ - exception->exception_class[0] = 'Q'; - exception->exception_class[1] = 'M'; - exception->exception_class[2] = 'L'; - exception->exception_class[3] = 'J'; - exception->exception_class[4] = 'S'; - exception->exception_class[5] = 'V'; - exception->exception_class[6] = '4'; - exception->exception_class[7] = 0; -#else - exception->exception_class = 0x514d4c4a53563400; // QMLJSV40 -#endif - - _Unwind_RaiseException(exception); - std::terminate(); -} - -QT_END_NAMESPACE - -/* - * We override these EABI defined symbols on Android, where we must statically link in the unwinder from libgcc.a - * and thus also ensure that compiler generated cleanup code / landing pads end up calling these stubs, that - * ultimately return control to our copy of the unwinder. The symbols are also exported from gnustl_shared, which - * comes later in the link line. - */ -#if defined(__ANDROID__) && defined(__ARM_EABI_UNWINDER__) -#pragma GCC visibility push(default) -#ifdef __thumb__ -asm (" .pushsection .text.__cxa_end_cleanup\n" -" .global __cxa_end_cleanup\n" -" .type __cxa_end_cleanup, \"function\"\n" -" .thumb_func\n" -"__cxa_end_cleanup:\n" -" push\t{r1, r2, r3, r4}\n" -" bl\t__gnu_end_cleanup\n" -" pop\t{r1, r2, r3, r4}\n" -" bl\t_Unwind_Resume @ Never returns\n" -" .popsection\n"); -#else -asm (" .pushsection .text.__cxa_end_cleanup\n" -" .global __cxa_end_cleanup\n" -" .type __cxa_end_cleanup, \"function\"\n" -"__cxa_end_cleanup:\n" -" stmfd\tsp!, {r1, r2, r3, r4}\n" -" bl\t__gnu_end_cleanup\n" -" ldmfd\tsp!, {r1, r2, r3, r4}\n" -" bl\t_Unwind_Resume @ Never returns\n" -" .popsection\n"); -#endif -#pragma GCC visibility pop -#endif - -#endif diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index f6db36b0d0..595f637572 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -332,10 +332,6 @@ struct Q_QML_EXPORT ExecutionEngine // Use only inside catch(...) -- will re-throw if no JS exception static QQmlError catchExceptionAsQmlError(QV4::ExecutionContext *context); - void Q_NORETURN throwInternal(); - // ---- - - private: QmlExtensions *m_qmlExtensions; }; |