Lines Matching defs:ex

70                            struct __cxa_exception *ex,
82 if (ex)
84 ex->handlerSwitchValue = selector;
85 ex->catchTemp = landingPad;
94 struct __cxa_exception *ex,
103 if (ex)
105 *selector = ex->handlerSwitchValue;
106 *landingPad = reinterpret_cast<dw_eh_ptr_t>(ex->catchTemp);
113 static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex,
117 if (__gnu_unwind_frame(ex, context) != _URC_OK) { return _URC_FAILURE; }
268 static __cxa_exception *exceptionFromPointer(void *ex)
270 return reinterpret_cast<__cxa_exception*>(static_cast<char*>(ex) -
273 static __cxa_exception *realExceptionFromException(__cxa_exception *ex)
275 if (!isDependentException(ex->unwindHeader.exception_class)) { return ex; }
276 return reinterpret_cast<__cxa_exception*>((reinterpret_cast<__cxa_dependent_exception*>(ex))->primaryException)-1;
305 struct _Unwind_Exception *ex)
311 __cxa_free_exception(static_cast<void*>(ex + 1));
314 struct _Unwind_Exception *ex)
317 __cxa_free_dependent_exception(static_cast<void*>(ex + 1));
323 static void free_exception_list(__cxa_exception *ex)
325 if (0 != ex->nextException)
327 free_exception_list(ex->nextException);
331 __cxa_free_exception(ex+1);
621 __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
623 if (0 != ex->exceptionDestructor)
627 ex->exceptionDestructor(thrown_exception);
636 free_exception(reinterpret_cast<char*>(ex) -
658 __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(thrown_exception) - 1;
659 assert(isDependentException(ex->unwindHeader.exception_class));
660 if (ex->primaryException)
662 releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex)));
664 free_exception(reinterpret_cast<char*>(ex) -
759 static void throw_exception(__cxa_exception *ex)
762 ex->unexpectedHandler = info->unexpectedHandler;
763 if (0 == ex->unexpectedHandler)
765 ex->unexpectedHandler = unexpectedHandler;
767 ex->terminateHandler = info->terminateHandler;
768 if (0 == ex->terminateHandler)
770 ex->terminateHandler = terminateHandler;
774 _Unwind_Reason_Code err = _Unwind_RaiseException(&ex->unwindHeader);
778 report_failure(err, ex);
791 __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
793 ex->referenceCount = 1;
794 ex->exceptionType = tinfo;
796 ex->exceptionDestructor = dest;
798 ex->unwindHeader.exception_class = exception_class;
799 ex->unwindHeader.exception_cleanup = exception_cleanup;
801 throw_exception(ex);
809 __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(__cxa_allocate_dependent_exception())-1;
811 ex->primaryException = thrown_exception;
814 ex->exceptionType = original->exceptionType;
815 ex->unwindHeader.exception_class = dependent_exception_class;
816 ex->unwindHeader.exception_cleanup = dependent_exception_cleanup;
818 throw_exception(reinterpret_cast<__cxa_exception*>(ex));
824 __cxa_exception *ex = globals->caughtExceptions;
826 if (0 == ex) { return NULL; }
827 ex = realExceptionFromException(ex);
828 __sync_fetch_and_add(&ex->referenceCount, 1);
829 return ex + 1;
835 __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1;
836 if (isDependentException(ex->unwindHeader.exception_class)) { return; }
837 __sync_fetch_and_add(&ex->referenceCount, 1);
842 __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1;
843 releaseException(ex);
862 __cxa_exception *ex = globals->caughtExceptions;
864 if (0 == ex)
874 _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ex);
876 report_failure(err, ex);
880 assert(ex->handlerCount > 0 && "Rethrowing uncaught exception!");
882 // ex->handlerCount will be decremented in __cxa_end_catch in enclosing
888 ex->handlerCount = -ex->handlerCount;
894 _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(&ex->unwindHeader);
895 report_failure(err, ex);
925 * object. If ex is 0 then it is assumed to be a foreign exception and only
928 static bool check_type_signature(__cxa_exception *ex,
932 void *exception_ptr = static_cast<void*>(ex+1);
933 const std::type_info *ex_type = ex ? ex->exceptionType : 0;
935 bool is_ptr = ex ? ex_type->__is_pointer_p() : false;
946 if (ex)
953 if (0 == ex) { return false; }
982 __cxa_exception *ex,
1000 if (check_type_signature(ex, handler_type, adjustedPtr))
1006 else if (filter < 0 && 0 != ex)
1015 if (check_type_signature(ex, handler_type, adjustedPtr))
1030 if (check_type_signature(ex, handler_type, adjustedPtr))
1053 __cxa_exception *ex)
1057 if (ex)
1059 ex->cleanupCount++;
1060 if (ex->cleanupCount > 1)
1065 ex->nextCleanup = info->currentCleanup;
1085 __cxa_exception *ex = 0;
1096 ex = exceptionFromPointer(exceptionObject);
1097 realEx = realExceptionFromException(ex);
1145 action.action_record, realEx, &selector, ex->adjustedPtr);
1152 if (ex)
1154 saveLandingPad(context, exceptionObject, ex, selector, action.landing_pad);
1155 ex->languageSpecificData = reinterpret_cast<const char*>(lsda_addr);
1156 ex->actionRecord = reinterpret_cast<const char*>(action.action_record);
1157 // ex->adjustedPtr is set when finding the action record.
1176 action.action_record, realEx, &selector, ex->adjustedPtr);
1179 pushCleanupException(exceptionObject, ex);
1186 &selector, ex->adjustedPtr);
1188 else if (ex->catchTemp == 0)
1196 loadLandingPad(context, exceptionObject, ex, &selector, &action.landing_pad);
1197 ex->catchTemp = 0;
1198 ex->handlerSwitchValue = 0;
1232 __cxa_exception *ex = exceptionFromPointer(exceptionObject);
1234 if (ex->handlerCount == 0)
1239 ex->nextException = globals->caughtExceptions;
1240 globals->caughtExceptions = ex;
1243 if (ex->handlerCount < 0)
1263 ex->handlerCount = -ex->handlerCount + 1;
1267 ex->handlerCount++;
1271 return ex->adjustedPtr;
1302 __cxa_exception *ex = globals->caughtExceptions;
1304 assert(0 != ex && "Ending catch when no exception is on the stack!");
1321 if (ex->handlerCount < 0)
1339 ex->handlerCount++;
1344 ex->handlerCount--;
1347 if (ex->handlerCount == 0)
1349 globals->caughtExceptions = ex->nextException;
1352 releaseException(ex);
1363 __cxa_exception *ex = globals->caughtExceptions;
1364 return ex ? ex->exceptionType : 0;
1377 __cxa_exception *ex = exceptionFromPointer(exceptionObject);
1378 if (ex->unexpectedHandler)
1380 ex->unexpectedHandler();
1541 __cxa_exception *ex = exceptionFromPointer(exceptionObject);
1542 ex->cleanupCount--;
1543 if (ex->cleanupCount == 0)
1545 info->currentCleanup = ex->nextCleanup;
1546 ex->nextCleanup = 0;