Changeset 1bc9dcb for doc/working


Ignore:
Timestamp:
Jun 16, 2017, 3:34:55 PM (8 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:
9d85038
Parents:
a724ac1 (diff), d33bc7c (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

Location:
doc/working/exception
Files:
3 added
4 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • doc/working/exception/translate.c

    ra724ac1 r1bc9dcb  
    22 *
    33 * Note that these are not final. Names, syntax and the exact translation
    4  * will be updated. The first section is the shared definitions we will have
    5  * to have access to where the translations are preformed.
     4 * will be updated. The first section is the shared definitions, not generated
     5 * by the local translations but used by the translated code.
     6 *
     7 * Most of these exist only after translation (in C code). The first (the
     8 * exception type) has to exist in Cforall code so that it can be used
     9 * directly in Cforall. The two __throw_* functions might have wrappers in
     10 * Cforall, but the underlying functions should probably be C. struct
     11 * stack_exception_data has to exist inside of the coroutine data structures
     12 * and so should be compiled as they are.
    613 */
    714
    8 // Currently it is a typedef for int, but later it will be the root of the
    9 // hierarchy and so have to be public.
     15// Currently it is a typedef for int, but later it will be a new type.
    1016typedef int exception;
    1117
    12 // These might be given simpler names and made public.
    1318void __throw_terminate(exception except) __attribute__((noreturn));
    1419void __throw_resume(exception except);
     
    4954
    5055__throw_resume(exception_instance);
     56
     57
     58
     59// Rethrows (inside matching handlers):
     60"Cforall"
     61
     62throw;
     63
     64resume;
     65
     66"C"
     67
     68__rethrow_terminate();
     69
     70return false;
    5171
    5272
     
    232252                }
    233253                void finally1() {
    234                         // (Finally, because of timing, also work for resume.)
     254                        // Finally, because of timing, also works for resume.
     255                        // However this might not actually be better in any way.
    235256                        __try_resume_cleanup();
    236257
Note: See TracChangeset for help on using the changeset viewer.