Lines Matching refs: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);
605 __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
607 if (0 != ex->exceptionDestructor)
611 ex->exceptionDestructor(thrown_exception);
620 free_exception(reinterpret_cast<char*>(ex));
641 __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(thrown_exception) - 1;
642 assert(isDependentException(ex->unwindHeader.exception_class));
643 if (ex->primaryException)
645 releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex)));
647 free_exception(reinterpret_cast<char*>(ex));
739 static void throw_exception(__cxa_exception *ex)
742 ex->unexpectedHandler = info->unexpectedHandler;
743 if (0 == ex->unexpectedHandler)
745 ex->unexpectedHandler = unexpectedHandler;
747 ex->terminateHandler = info->terminateHandler;
748 if (0 == ex->terminateHandler)
750 ex->terminateHandler = terminateHandler;
754 _Unwind_Reason_Code err = _Unwind_RaiseException(&ex->unwindHeader);
758 report_failure(err, ex);
771 __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
773 ex->referenceCount = 1;
774 ex->exceptionType = tinfo;
776 ex->exceptionDestructor = dest;
778 ex->unwindHeader.exception_class = exception_class;
779 ex->unwindHeader.exception_cleanup = exception_cleanup;
781 throw_exception(ex);
789 __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(__cxa_allocate_dependent_exception())-1;
791 ex->primaryException = thrown_exception;
794 ex->exceptionType = original->exceptionType;
795 ex->unwindHeader.exception_class = dependent_exception_class;
796 ex->unwindHeader.exception_cleanup = dependent_exception_cleanup;
798 throw_exception(reinterpret_cast<__cxa_exception*>(ex));
804 __cxa_exception *ex = globals->caughtExceptions;
806 if (0 == ex) { return NULL; }
807 ex = realExceptionFromException(ex);
808 __sync_fetch_and_add(&ex->referenceCount, 1);
809 return ex + 1;
815 __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1;
816 if (isDependentException(ex->unwindHeader.exception_class)) { return; }
817 __sync_fetch_and_add(&ex->referenceCount, 1);
822 __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1;
823 releaseException(ex);
842 __cxa_exception *ex = globals->caughtExceptions;
844 if (0 == ex)
854 _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ex);
856 report_failure(err, ex);
860 assert(ex->handlerCount > 0 && "Rethrowing uncaught exception!");
869 // ex->handlerCount will be decremented in __cxa_end_catch in enclosing
875 ex->handlerCount = -ex->handlerCount;
881 _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(&ex->unwindHeader);
882 report_failure(err, ex);
912 * object. If ex is 0 then it is assumed to be a foreign exception and only
915 static bool check_type_signature(__cxa_exception *ex,
919 void *exception_ptr = static_cast<void*>(ex+1);
920 const std::type_info *ex_type = ex ? ex->exceptionType : 0;
922 bool is_ptr = ex ? ex_type->__is_pointer_p() : false;
933 if (ex)
940 if (0 == ex) { return false; }
969 __cxa_exception *ex,
987 if (check_type_signature(ex, handler_type, adjustedPtr))
993 else if (filter < 0 && 0 != ex)
1002 if (check_type_signature(ex, handler_type, adjustedPtr))
1017 if (check_type_signature(ex, handler_type, adjustedPtr))
1040 __cxa_exception *ex)
1044 if (ex)
1046 ex->cleanupCount++;
1047 if (ex->cleanupCount > 1)
1052 ex->nextCleanup = info->currentCleanup;
1072 __cxa_exception *ex = 0;
1083 ex = exceptionFromPointer(exceptionObject);
1084 realEx = realExceptionFromException(ex);
1132 action.action_record, realEx, &selector, ex->adjustedPtr);
1139 if (ex)
1141 saveLandingPad(context, exceptionObject, ex, selector, action.landing_pad);
1142 ex->languageSpecificData = reinterpret_cast<const char*>(lsda_addr);
1143 ex->actionRecord = reinterpret_cast<const char*>(action.action_record);
1144 // ex->adjustedPtr is set when finding the action record.
1163 action.action_record, realEx, &selector, ex->adjustedPtr);
1166 pushCleanupException(exceptionObject, ex);
1173 &selector, ex->adjustedPtr);
1175 else if (ex->catchTemp == 0)
1183 loadLandingPad(context, exceptionObject, ex, &selector, &action.landing_pad);
1184 ex->catchTemp = 0;
1185 ex->handlerSwitchValue = 0;
1221 __cxa_exception *ex = exceptionFromPointer(exceptionObject);
1223 if (ex->handlerCount == 0)
1228 ex->nextException = globals->caughtExceptions;
1229 globals->caughtExceptions = ex;
1232 if (ex->handlerCount < 0)
1252 ex->handlerCount = -ex->handlerCount + 1;
1256 ex->handlerCount++;
1260 return ex->adjustedPtr;
1291 __cxa_exception *ex = globals->caughtExceptions;
1293 assert(0 != ex && "Ending catch when no exception is on the stack!");
1310 if (ex->handlerCount < 0)
1328 ex->handlerCount++;
1333 ex->handlerCount--;
1336 if (ex->handlerCount == 0)
1338 globals->caughtExceptions = ex->nextException;
1341 releaseException(ex);
1352 __cxa_exception *ex = globals->caughtExceptions;
1353 return ex ? ex->exceptionType : 0;
1380 __cxa_exception *ex = exceptionFromPointer(exceptionObject);
1381 if (ex->unexpectedHandler)
1383 ex->unexpectedHandler();
1544 __cxa_exception *ex = exceptionFromPointer(exceptionObject);
1545 ex->cleanupCount--;
1546 if (ex->cleanupCount == 0)
1548 info->currentCleanup = ex->nextCleanup;
1549 ex->nextCleanup = 0;