Ignore:
Timestamp:
Aug 11, 2017, 10:33:37 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
54cd58b0
Parents:
3d4b23fa (diff), 59a75cb (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:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/except-0.c

    r3d4b23fa r0720e049  
    66#include <stdbool.h>
    77
     8// Local type to mark exits from scopes. (see ERROR)
    89struct signal_exit {
    910        const char * area;
     
    1920}
    2021
    21 void terminate(int except_value) {
     22
     23// Local Exception Types and manual vtable types.
     24//#define TRIVIAL_EXCEPTION(name) //TRIVAL_EXCEPTION(yin)
     25struct yin;
     26struct yin_vtable {
     27        struct exception_t_vtable const * parent;
     28        size_t size;
     29    void (*copy)(yin *this, yin * other);
     30    void (*free)(yin *this);
     31    const char (*msg)(yin *this);
     32};
     33struct yin {
     34        struct yin_vtable const * parent;
     35};
     36void yin_msg(yin) {
     37        return "in";
     38}
     39yin_vtable _yin_vtable_instance = {
     40        &_exception_t_vtable_instance, sizeof(yin), ?{}, ^?{}, yin_msg
     41}
     42
     43
     44void terminate(exception * except_value) {
    2245        signal_exit a = {"terminate function"};
    2346        throw except_value;
     
    2548}
    2649
    27 void resume(int except_value) {
     50void resume(exception * except_value) {
    2851        signal_exit a = {"resume function"};
    2952        throwResume except_value;
Note: See TracChangeset for help on using the changeset viewer.