Ignore:
Timestamp:
Jul 28, 2017, 2:06:10 PM (4 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
03eedd5, 79dbb79
Parents:
a2e0687
Message:

Added the memory management calls to the exception control flow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/exception.h

    ra2e0687 r86d5ba7c  
    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 Jul 27 12:42:00 2017
     13// Update Count     : 4
    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
     23#if 1
     24typedef int exception;
     25#else
     26struct exception_t;
     27struct exception_t_vtable {
     28        struct exception_t_vtable const * parent;
     29        size_t size;
     30        void (*copy)(struct exception_t *this, struct exception_t * other);
     31        void (*free)(struct exception_t *this);
     32        const char (*msg)(struct exception_t *this);
     33};
     34struct exception_t {
     35        struct exception_vtable const * virtual_table;
     36};
     37typedef struct exception_t exception;
     38#endif
     39
    2440
    2541// Used in throw statement translation.
     
    3450    int (*match_block)(exception * except));
    3551
     52// Clean-up the exception in catch blocks.
     53void __cfaehm__cleanup_terminate(exception ** except);
     54
    3655// Data structure creates a list of resume handlers.
    3756struct __cfaehm__try_resume_node {
     
    4059};
    4160
     61// These act as constructor and destructor for the resume node.
    4262void __cfaehm__try_resume_setup(
    4363    struct __cfaehm__try_resume_node * node,
     
    4767
    4868// Check for a standard way to call fake deconstructors.
    49 struct __cfaehm__cleanup_hook {
    50 };
     69struct __cfaehm__cleanup_hook {};
    5170
    5271#ifdef __CFORALL__
Note: See TracChangeset for help on using the changeset viewer.