"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "runtime/druntime/src/ldc/eh_msvc.d" between
ldc-1.32.0.tar.gz and ldc-1.32.1.tar.gz

About: LDC is a LLVM-based D compiler.

eh_msvc.d  (ldc-1.32.0):eh_msvc.d  (ldc-1.32.1)
skipping to change at line 115 skipping to change at line 115
import core.stdc.stdio; import core.stdc.stdio;
va_list args; va_list args;
va_start(args, format); va_start(args, format);
fprintf(stderr, "Fatal error in EH code: "); fprintf(stderr, "Fatal error in EH code: ");
vfprintf(stderr, format, args); vfprintf(stderr, format, args);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
abort(); abort();
} }
extern(C) Throwable.TraceInfo _d_traceContext(void* ptr = null); extern(C) void _d_createTrace(Throwable t, void* context);
extern(C) void _d_throw_exception(Throwable throwable) extern(C) void _d_throw_exception(Throwable throwable)
{ {
if (throwable is null) if (throwable is null)
fatalerror("Cannot throw null exception"); fatalerror("Cannot throw null exception");
auto ti = typeid(throwable); auto ti = typeid(throwable);
if (ti is null) if (ti is null)
fatalerror("Cannot throw corrupt exception object with null classinfo"); fatalerror("Cannot throw corrupt exception object with null classinfo");
/* Increment reference count if `o` is a refcounted Throwable /* Increment reference count if `o` is a refcounted Throwable
skipping to change at line 141 skipping to change at line 141
if (exceptionStack.length > 0) if (exceptionStack.length > 0)
{ {
// we expect that the terminate handler will be called, so hook // we expect that the terminate handler will be called, so hook
// it to avoid it actually terminating // it to avoid it actually terminating
if (!old_terminate_handler) if (!old_terminate_handler)
old_terminate_handler = set_terminate(&msvc_eh_terminate); old_terminate_handler = set_terminate(&msvc_eh_terminate);
} }
exceptionStack.push(throwable); exceptionStack.push(throwable);
if (throwable.info is null && cast(byte*)throwable !is ti.initializer.ptr) _d_createTrace(throwable, null);
throwable.info = _d_traceContext();
CxxExceptionInfo info; CxxExceptionInfo info;
info.Magic = EH_MAGIC_NUMBER1; info.Magic = EH_MAGIC_NUMBER1;
info.pThrowable = &throwable; info.pThrowable = &throwable;
info.ThrowInfo = getThrowInfo(ti).toPointer; info.ThrowInfo = getThrowInfo(ti).toPointer;
version (Win64) info.ImgBase = ehHeap.base; version (Win64) info.ImgBase = ehHeap.base;
RaiseException(STATUS_MSC_EXCEPTION, EXCEPTION_NONCONTINUABLE, RaiseException(STATUS_MSC_EXCEPTION, EXCEPTION_NONCONTINUABLE,
info.sizeof / size_t.sizeof, cast(ULONG_PTR*)&info); info.sizeof / size_t.sizeof, cast(ULONG_PTR*)&info);
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)