Changes in / [1ce2189:8c97ee7]
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/ExceptTranslate.cc
r1ce2189 r8c97ee7 354 354 } 355 355 handling_code->push_back( new ReturnStmt( noLabels, 356 new ConstantExpr( Constant::from_bool( true ) ) ) );356 new ConstantExpr( Constant::from_bool( false ) ) ) ); 357 357 handler->set_body( handling_code ); 358 358 … … 361 361 *it = nullptr; 362 362 } 363 364 body->push_back( new ReturnStmt( noLabels, new ConstantExpr(365 Constant::from_bool( false ) ) ) );366 363 367 364 return new FunctionDecl("handle", Type::StorageClasses(), -
src/libcfa/exception.c
r1ce2189 r8c97ee7 37 37 // This macro should be the only thing that needs to change across machines. 38 38 // Used in the personality function, way down in termination. 39 // struct _Unwind_Context * -> _Unwind_Reason_Code(*)( exception *)39 // struct _Unwind_Context * -> _Unwind_Reason_Code(*)() 40 40 #define MATCHER_FROM_CONTEXT(ptr_to_context) \ 41 (*(_Unwind_Reason_Code(**)( exception*))(_Unwind_GetCFA(ptr_to_context) + 8))41 (*(_Unwind_Reason_Code(**)())(_Unwind_GetCFA(ptr_to_context) + 8)) 42 42 43 43 … … 261 261 // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 262 262 263 _Unwind_Reason_Code (*matcher)( exception *) =263 _Unwind_Reason_Code (*matcher)() = 264 264 MATCHER_FROM_CONTEXT(context); 265 int index = matcher( &shared_stack.current_exception);265 int index = matcher(shared_stack.current_exception); 266 266 _Unwind_Reason_Code ret = (0 == index) 267 267 ? _URC_CONTINUE_UNWIND : _URC_HANDLER_FOUND; -
src/tests/except-0.c
r1ce2189 r8c97ee7 1 1 // Draft of tests for exception handling. 2 3 // ERROR: exceptions do not interact with ^?{} properly.4 2 5 3 #include <stdio.h> … … 119 117 // Resume Throw New Exception: 120 118 void resume_swap() { 121 signal_exit a = {" resume_swap"};119 signal_exit a = {"terminate_swap"}; 122 120 try { 123 121 resume(2);
Note:
See TracChangeset
for help on using the changeset viewer.