Ignore:
Timestamp:
Aug 10, 2017, 3:39:11 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
38d70ab
Parents:
275f4b4 (diff), e1780a2 (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
  • src/libcfa/exception.h

    r275f4b4 rcd7ef0b  
    99// Author           : Andrew Beach
    1010// Created On       : Mon Jun 26 15:11:00 2017
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:57:02 2017
    13 // Update Count     : 3
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Aug  4 15:20:00 2017
     13// Update Count     : 5
    1414//
    1515
    1616#pragma once
    1717
    18 // Later to be a special structure type.
    19 typedef int exception;
    2018
    2119#ifdef __CFORALL__
    2220extern "C" {
    2321#endif
     22
     23struct __cfaehm__base_exception_t;
     24typedef struct __cfaehm__base_exception_t exception;
     25struct __cfaehm__base_exception_t_vtable {
     26        const struct __cfaehm__base_exception_t_vtable * parent;
     27        size_t size;
     28        void (*copy)(struct __cfaehm__base_exception_t *this,
     29                     struct __cfaehm__base_exception_t * other);
     30        void (*free)(struct __cfaehm__base_exception_t *this);
     31        const char (*msg)(struct __cfaehm__base_exception_t *this);
     32};
     33struct __cfaehm__base_exception_t {
     34        struct __cfaehm__base_exception_t_vtable const * virtual_table;
     35};
     36extern struct __cfaehm__base_exception_t_vtable
     37        ___cfaehm__base_exception_t_vtable_instance;
     38
    2439
    2540// Used in throw statement translation.
     
    3449    int (*match_block)(exception * except));
    3550
     51// Clean-up the exception in catch blocks.
     52void __cfaehm__cleanup_terminate(void * except);
     53
    3654// Data structure creates a list of resume handlers.
    3755struct __cfaehm__try_resume_node {
     
    4058};
    4159
     60// These act as constructor and destructor for the resume node.
    4261void __cfaehm__try_resume_setup(
    4362    struct __cfaehm__try_resume_node * node,
     
    4766
    4867// Check for a standard way to call fake deconstructors.
    49 struct __cfaehm__cleanup_hook {
    50 };
     68struct __cfaehm__cleanup_hook {};
    5169
    5270#ifdef __CFORALL__
Note: See TracChangeset for help on using the changeset viewer.