Ignore:
Timestamp:
Apr 6, 2020, 8:50:45 PM (20 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
9d5d01f
Parents:
23ecea4 (diff), f1b6671 (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.
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/exception.c

    r23ecea4 re276be6  
    1010// Created On       : Mon Jun 26 15:13:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Apr 03 11:57:00 2020
    13 // Update Count     : 14
     12// Last Modified On : Mon Apr 06 14:40:00 2020
     13// Update Count     : 15
    1414//
    1515
     
    7575// RESUMPTION ================================================================
    7676
     77static void reset_top_resume(struct __cfaehm_try_resume_node ** store) {
     78        this_exception_context()->top_resume = *store;
     79}
     80
    7781void __cfaehm_throw_resume(exception_t * except) {
    7882        struct exception_context_t * context = this_exception_context();
     
    8084        __cfaabi_dbg_print_safe("Throwing resumption exception\n");
    8185
     86        __attribute__((cleanup(reset_top_resume)))
    8287        struct __cfaehm_try_resume_node * original_head = context->top_resume;
    8388        struct __cfaehm_try_resume_node * current = context->top_resume;
     
    8691                context->top_resume = current->next;
    8792                if (current->handler(except)) {
    88                         context->top_resume = original_head;
    8993                        return;
    9094                }
     
    9296
    9397        __cfaabi_dbg_print_safe("Unhandled exception\n");
    94         context->top_resume = original_head;
    9598
    9699        // Fall back to termination:
Note: See TracChangeset for help on using the changeset viewer.