Lines Matching defs:exception_header

48 // Note:  This is never called when exception_header is masquerading as a
53 thrown_object_from_cxa_exception(__cxa_exception* exception_header)
55 return static_cast<void*>(exception_header + 1);
135 __cxa_exception* exception_header = cxa_exception_from_exception_unwind_exception(unwind_exception);
137 std::__terminate(exception_header->terminateHandler);
143 static _LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) {
151 (void) __cxa_begin_catch(&exception_header->unwindHeader);
152 std::__terminate(exception_header->terminateHandler);
194 __cxa_exception *exception_header =
196 std::memset(exception_header, 0, actual_size);
197 return thrown_object_from_cxa_exception(exception_header);
260 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
262 exception_header->unexpectedHandler = std::get_unexpected();
263 exception_header->terminateHandler = std::get_terminate();
264 exception_header->exceptionType = tinfo;
265 exception_header->exceptionDestructor = dest;
266 setOurExceptionClass(&exception_header->unwindHeader);
267 exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety.
270 exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
278 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
280 _Unwind_RaiseException(&exception_header->unwindHeader);
284 failed_throw(exception_header);
314 __cxa_exception* exception_header =
319 if (0 == exception_header->propagationCount)
321 exception_header->nextPropagatingException = globals->propagatingExceptions;
322 globals->propagatingExceptions = exception_header;
324 ++exception_header->propagationCount;
332 globals->propagatingExceptions = exception_header;
352 __cxa_exception* exception_header = globals->propagatingExceptions;
353 if (NULL == exception_header)
360 if (__isOurExceptionClass(&exception_header->unwindHeader))
362 --exception_header->propagationCount;
363 if (0 == exception_header->propagationCount)
365 globals->propagatingExceptions = exception_header->nextPropagatingException;
366 exception_header->nextPropagatingException = NULL;
373 return &exception_header->unwindHeader;
427 // exception_header is a hackish offset from a foreign exception, but it
430 __cxa_exception* exception_header =
438 exception_header->handlerCount = exception_header->handlerCount < 0 ?
439 -exception_header->handlerCount + 1 : exception_header->handlerCount + 1;
442 if (exception_header != globals->caughtExceptions)
444 exception_header->nextException = globals->caughtExceptions;
445 globals->caughtExceptions = exception_header;
449 return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
451 return exception_header->adjustedPtr;
459 globals->caughtExceptions = exception_header;
496 __cxa_exception* exception_header = globals->caughtExceptions;
500 if (NULL != exception_header)
502 bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader);
506 if (exception_header->handlerCount < 0)
509 if (0 == incrementHandlerCount(exception_header))
512 globals->caughtExceptions = exception_header->nextException;
522 if (0 == decrementHandlerCount(exception_header))
525 globals->caughtExceptions = exception_header->nextException;
528 if (isDependentException(&exception_header->unwindHeader))
530 // Reset exception_header to primaryException and deallocate the dependent exception
532 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
533 exception_header =
539 __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header));
556 // Note: exception_header may be masquerading as a __cxa_dependent_exception
564 __cxa_exception *exception_header = globals->caughtExceptions;
565 if (NULL == exception_header)
567 if (!__isOurExceptionClass(&exception_header->unwindHeader))
569 return exception_header->exceptionType;
581 Note: exception_header may be masquerading as a __cxa_dependent_exception
586 __cxa_exception* exception_header = globals->caughtExceptions;
587 if (NULL == exception_header)
589 bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader);
593 exception_header->handlerCount = -exception_header->handlerCount;
606 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
608 _Unwind_RaiseException(&exception_header->unwindHeader);
615 __cxa_begin_catch(&exception_header->unwindHeader);
617 std::__terminate(exception_header->terminateHandler);
618 // Foreign exception: can't get exception_header->terminateHandler
633 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
634 std::__libcpp_atomic_add(&exception_header->referenceCount, size_t(1));
650 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
651 if (std::__libcpp_atomic_add(&exception_header->referenceCount, size_t(-1)) == 0)
653 if (NULL != exception_header->exceptionDestructor)
654 exception_header->exceptionDestructor(thrown_object);
675 __cxa_exception* exception_header = globals->caughtExceptions;
676 if (NULL == exception_header)
678 if (!__isOurExceptionClass(&exception_header->unwindHeader))
680 if (isDependentException(&exception_header->unwindHeader)) {
682 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
683 exception_header = cxa_exception_from_thrown_object(dep_exception_header->primaryException);
685 void* thrown_object = thrown_object_from_cxa_exception(exception_header);
719 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
724 dep_exception_header->exceptionType = exception_header->exceptionType;