1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

msvcp110: Add std::_Rethrow_future_exception implementation.

This commit is contained in:
Vijay Kiran Kamuju 2023-04-01 11:23:41 +00:00 committed by Alexandre Julliard
parent 11934d2c92
commit 389fbcf961
6 changed files with 38 additions and 25 deletions

View File

@ -1732,7 +1732,7 @@
@ cdecl -arch=win64 ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@G_K@Z(ptr ptr ptr long long) num_put_wchar__Rep
@ cdecl -arch=win32 ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_WI@Z(ptr ptr long ptr long long) num_put_wchar__Rep
@ cdecl -arch=win64 ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_W_K@Z(ptr ptr ptr long long) num_put_wchar__Rep
@ stub ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ cdecl -norelay ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z() _Rethrow_future_exception
@ stub -arch=win32 ?_Rng_abort@std@@YAXPBD@Z
@ stub -arch=win64 ?_Rng_abort@std@@YAXPEBD@Z
@ cdecl -arch=win32 ?_Segment_index_of@_Concurrent_vector_base_v4@details@Concurrency@@KAII@Z(long) _vector_base_v4__Segment_index_of

View File

@ -1693,7 +1693,7 @@
@ cdecl -arch=win64 ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@G_K@Z(ptr ptr ptr long long) num_put_wchar__Rep
@ cdecl -arch=win32 ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_WI@Z(ptr ptr long ptr long long) num_put_wchar__Rep
@ cdecl -arch=win64 ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_W_K@Z(ptr ptr ptr long long) num_put_wchar__Rep
@ stub ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ cdecl -norelay ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z() _Rethrow_future_exception
@ stub -arch=win32 ?_Rng_abort@std@@YAXPBD@Z
@ stub -arch=win64 ?_Rng_abort@std@@YAXPEBD@Z
@ cdecl -arch=win32 ?_Segment_index_of@_Concurrent_vector_base_v4@details@Concurrency@@KAII@Z(long) _vector_base_v4__Segment_index_of

View File

@ -1693,7 +1693,7 @@
@ cdecl -arch=win64 ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@G_K@Z(ptr ptr ptr long long) msvcp120.?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@G_K@Z
@ cdecl -arch=win32 ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_WI@Z(ptr ptr long ptr long long) msvcp120.?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_WI@Z
@ cdecl -arch=win64 ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_W_K@Z(ptr ptr ptr long long) msvcp120.?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_W_K@Z
@ stub ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ cdecl -norelay ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z() msvcp120.?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ stub -arch=win32 ?_Rng_abort@std@@YAXPBD@Z
@ stub -arch=win64 ?_Rng_abort@std@@YAXPEBD@Z
@ cdecl -arch=win32 ?_Segment_index_of@_Concurrent_vector_base_v4@details@Concurrency@@KAII@Z(long) msvcp120.?_Segment_index_of@_Concurrent_vector_base_v4@details@Concurrency@@KAII@Z

View File

@ -1595,7 +1595,7 @@
@ cdecl -arch=arm ?_Reset@_ContextCallback@details@Concurrency@@AAAXXZ(ptr) _ContextCallback__Reset
@ thiscall -arch=i386 ?_Reset@_ContextCallback@details@Concurrency@@AAEXXZ(ptr) _ContextCallback__Reset
@ cdecl -arch=win64 ?_Reset@_ContextCallback@details@Concurrency@@AEAAXXZ(ptr) _ContextCallback__Reset
@ stub ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ cdecl -norelay ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z() _Rethrow_future_exception
@ stub -arch=win32 ?_Rng_abort@std@@YAXPBD@Z
@ stub -arch=win64 ?_Rng_abort@std@@YAXPEBD@Z
@ cdecl -arch=win32 ?_Schedule_chore@details@Concurrency@@YAHPAU_Threadpool_chore@12@@Z(ptr) _Schedule_chore

View File

@ -947,6 +947,38 @@ bool __cdecl MSVCP__uncaught_exception(void)
return __uncaught_exception();
}
#if _MSVCP_VER >= 110
typedef struct
{
EXCEPTION_RECORD *rec;
LONG *ref; /* not binary compatible with native */
} exception_ptr;
static void exception_ptr_rethrow(const exception_ptr *ep)
{
TRACE("(%p)\n", ep);
if (!ep->rec)
{
static const char *exception_msg = "bad exception";
exception e;
MSVCP_exception_ctor(&e, &exception_msg);
_CxxThrowException(&e, &exception_cxx_type);
return;
}
RaiseException(ep->rec->ExceptionCode, ep->rec->ExceptionFlags & (~EH_UNWINDING),
ep->rec->NumberParameters, ep->rec->ExceptionInformation);
}
/* ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z */
void __cdecl _Rethrow_future_exception(const exception_ptr ep)
{
exception_ptr_rethrow(&ep);
}
#endif
#if _MSVCP_VER >= 140
void** CDECL __current_exception(void);
@ -1002,12 +1034,6 @@ int __cdecl __uncaught_exceptions(void)
return *__processing_throw();
}
typedef struct
{
EXCEPTION_RECORD *rec;
LONG *ref; /* not binary compatible with native */
} exception_ptr;
/*********************************************************************
* ?__ExceptionPtrCreate@@YAXPAX@Z
* ?__ExceptionPtrCreate@@YAXPEAX@Z
@ -1102,20 +1128,7 @@ void __cdecl __ExceptionPtrAssign(exception_ptr *ep, const exception_ptr *assign
*/
void __cdecl __ExceptionPtrRethrow(const exception_ptr *ep)
{
TRACE("(%p)\n", ep);
if (!ep->rec)
{
static const char *exception_msg = "bad exception";
exception e;
MSVCP_exception_ctor(&e, &exception_msg);
_CxxThrowException(&e, &exception_cxx_type);
return;
}
RaiseException(ep->rec->ExceptionCode, ep->rec->ExceptionFlags & (~EH_UNWINDING),
ep->rec->NumberParameters, ep->rec->ExceptionInformation);
exception_ptr_rethrow(ep);
}
/*********************************************************************

View File

@ -1595,7 +1595,7 @@
@ cdecl -arch=arm ?_Reset@_ContextCallback@details@Concurrency@@AAAXXZ(ptr) msvcp140.?_Reset@_ContextCallback@details@Concurrency@@AAAXXZ
@ thiscall -arch=i386 ?_Reset@_ContextCallback@details@Concurrency@@AAEXXZ(ptr) msvcp140.?_Reset@_ContextCallback@details@Concurrency@@AAEXXZ
@ cdecl -arch=win64 ?_Reset@_ContextCallback@details@Concurrency@@AEAAXXZ(ptr) msvcp140.?_Reset@_ContextCallback@details@Concurrency@@AEAAXXZ
@ stub ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ cdecl -norelay ?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z() msvcp140.?_Rethrow_future_exception@std@@YAXVexception_ptr@1@@Z
@ stub -arch=win32 ?_Rng_abort@std@@YAXPBD@Z
@ stub -arch=win64 ?_Rng_abort@std@@YAXPEBD@Z
@ cdecl -arch=win32 ?_Schedule_chore@details@Concurrency@@YAHPAU_Threadpool_chore@12@@Z(ptr) msvcp140.?_Schedule_chore@details@Concurrency@@YAHPAU_Threadpool_chore@12@@Z