Mercurial > projects > ldc
comparison runtime/internal/eh.d @ 1597:761bf823e59e
Fix definition of _Unwind_Action.
Thanks to Garrison.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 18 Dec 2009 18:59:14 +0100 |
parents | f4c56ed32238 |
children |
comparison
equal
deleted
inserted
replaced
1596:42fc0d955a0d | 1597:761bf823e59e |
---|---|
52 | 52 |
53 enum _Unwind_Action : int | 53 enum _Unwind_Action : int |
54 { | 54 { |
55 SEARCH_PHASE = 1, | 55 SEARCH_PHASE = 1, |
56 CLEANUP_PHASE = 2, | 56 CLEANUP_PHASE = 2, |
57 HANDLER_PHASE = 3, | 57 HANDLER_FRAME = 4, |
58 FORCE_UNWIND = 4 | 58 FORCE_UNWIND = 8 |
59 } | 59 } |
60 | 60 |
61 alias void* _Unwind_Context_Ptr; | 61 alias void* _Unwind_Context_Ptr; |
62 | 62 |
63 alias void function(_Unwind_Reason_Code, _Unwind_Exception*) _Unwind_Exception_Cleanup_Fn; | 63 alias void function(_Unwind_Reason_Code, _Unwind_Exception*) _Unwind_Exception_Cleanup_Fn; |
348 debug(EH_personality) printf("Found catch clause!\n"); | 348 debug(EH_personality) printf("Found catch clause!\n"); |
349 | 349 |
350 if(actions & _Unwind_Action.SEARCH_PHASE) | 350 if(actions & _Unwind_Action.SEARCH_PHASE) |
351 return _Unwind_Reason_Code.HANDLER_FOUND; | 351 return _Unwind_Reason_Code.HANDLER_FOUND; |
352 | 352 |
353 else if(actions & _Unwind_Action.HANDLER_PHASE) | 353 else if(actions & _Unwind_Action.CLEANUP_PHASE) |
354 { | 354 { |
355 debug(EH_personality) printf("Setting switch value to: %d!\n", switchval); | 355 debug(EH_personality) printf("Setting switch value to: %d!\n", switchval); |
356 _Unwind_SetGR(context, eh_exception_regno, cast(ptrdiff_t)cast(void*)(exception_struct.exception_object)); | 356 _Unwind_SetGR(context, eh_exception_regno, cast(ptrdiff_t)cast(void*)(exception_struct.exception_object)); |
357 _Unwind_SetGR(context, eh_selector_regno, cast(ptrdiff_t)switchval); | 357 _Unwind_SetGR(context, eh_selector_regno, cast(ptrdiff_t)switchval); |
358 _Unwind_SetIP(context, landing_pad); | 358 _Unwind_SetIP(context, landing_pad); |