# HG changeset patch # User Christian Kamm # Date 1217159515 -7200 # Node ID 3ad8295cfac63f0d86771ffcd8d8f3670fbd3343 # Parent 62715be72a061e74dea448b5e06fa4a36bf39173 Mark most of the current EH implementation as x86 Linux specific. diff -r 62715be72a06 -r 3ad8295cfac6 tango/lib/compiler/llvmdc/eh.d --- a/tango/lib/compiler/llvmdc/eh.d Sun Jul 27 13:29:31 2008 +0200 +++ b/tango/lib/compiler/llvmdc/eh.d Sun Jul 27 13:51:55 2008 +0200 @@ -52,6 +52,7 @@ int private_2; } +version(X86) { version(linux) { void _Unwind_Resume(_Unwind_Exception*); _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception*); ulong _Unwind_GetLanguageSpecificData(_Unwind_Context_Ptr context); @@ -59,6 +60,21 @@ ulong _Unwind_SetIP(_Unwind_Context_Ptr context, ulong new_value); ulong _Unwind_SetGR(_Unwind_Context_Ptr context, int index, ulong new_value); ulong _Unwind_GetRegionStart(_Unwind_Context_Ptr context); +} } +else +{ + // runtime calls these directly + void _Unwind_Resume(_Unwind_Exception*) + { + console("_Unwind_Resume is not implemented on this platform.\n"); + } + _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception*) + { + console("_Unwind_RaiseException is not implemented on this platform.\n"); + return _Unwind_Reason_Code.FATAL_PHASE1_ERROR; + } +} + } @@ -127,6 +143,13 @@ //TODO: This may be the wrong way around char[8] _d_exception_class = "LLDCD1\0\0"; + +// +// x86 Linux specific implementation of personality function +// and helpers +// +version(X86) version(linux) { + // the personality routine gets called by the unwind handler and is responsible for // reading the EH tables and deciding what to do extern(C) _Unwind_Reason_Code _d_eh_personality(int ver, _Unwind_Action actions, ulong exception_class, _Unwind_Exception* exception_info, _Unwind_Context_Ptr context) @@ -306,6 +329,9 @@ callsite = data; } +} // end of x86 Linux specific implementation + + extern(C) void _d_throw_exception(Object e) { if (e !is null)