Changeset 1ce2189


Ignore:
Timestamp:
Jul 5, 2017, 4:47:00 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0614d14, 208e5be, a5de33e, ff919a3
Parents:
8c97ee7 (diff), b72d4ed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Thierry Delisle <tdelisle@…> (07/05/17 16:43:21)
git-committer:
Thierry Delisle <tdelisle@…> (07/05/17 16:47:00)
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/ExceptTranslate.cc

    r8c97ee7 r1ce2189  
    354354                        }
    355355                        handling_code->push_back( new ReturnStmt( noLabels,
    356                                 new ConstantExpr( Constant::from_bool( false ) ) ) );
     356                                new ConstantExpr( Constant::from_bool( true ) ) ) );
    357357                        handler->set_body( handling_code );
    358358
     
    361361                        *it = nullptr;
    362362                }
     363
     364                body->push_back( new ReturnStmt( noLabels, new ConstantExpr(
     365                        Constant::from_bool( false ) ) ) );
    363366
    364367                return new FunctionDecl("handle", Type::StorageClasses(),
  • src/libcfa/exception.c

    r8c97ee7 r1ce2189  
    3737// This macro should be the only thing that needs to change across machines.
    3838// Used in the personality function, way down in termination.
    39 // struct _Unwind_Context * -> _Unwind_Reason_Code(*)()
     39// struct _Unwind_Context * -> _Unwind_Reason_Code(*)(exception *)
    4040#define MATCHER_FROM_CONTEXT(ptr_to_context) \
    41         (*(_Unwind_Reason_Code(**)())(_Unwind_GetCFA(ptr_to_context) + 8))
     41        (*(_Unwind_Reason_Code(**)(exception*))(_Unwind_GetCFA(ptr_to_context) + 8))
    4242
    4343
     
    261261                                        // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher;                                   
    262262
    263                                         _Unwind_Reason_Code (*matcher)() =
     263                                        _Unwind_Reason_Code (*matcher)(exception *) =
    264264                                                MATCHER_FROM_CONTEXT(context);
    265                                         int index = matcher(shared_stack.current_exception);
     265                                        int index = matcher(&shared_stack.current_exception);
    266266                                        _Unwind_Reason_Code ret = (0 == index)
    267267                                                ? _URC_CONTINUE_UNWIND : _URC_HANDLER_FOUND;
  • src/tests/except-0.c

    r8c97ee7 r1ce2189  
    11// Draft of tests for exception handling.
     2
     3// ERROR: exceptions do not interact with ^?{} properly.
    24
    35#include <stdio.h>
     
    117119// Resume Throw New Exception:
    118120void resume_swap() {
    119         signal_exit a = {"terminate_swap"};
     121        signal_exit a = {"resume_swap"};
    120122        try {
    121123                resume(2);
Note: See TracChangeset for help on using the changeset viewer.