Ignore:
Timestamp:
Apr 13, 2021, 8:02:56 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e56cfb41
Parents:
0effb6a (diff), 7f5683e (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
  • tests/exceptions/interact.cfa

    r0effb6a r47e000c  
    44#include "except-io.hfa"
    55
    6 TRIVIAL_EXCEPTION(star);
    7 TRIVIAL_EXCEPTION(moon);
     6EHM_EXCEPTION(star)();
     7EHM_EXCEPTION(moon)();
     8
     9EHM_VIRTUAL_TABLE(star, star_vt);
     10EHM_VIRTUAL_TABLE(moon, moon_vt);
    811
    912int main(int argc, char * argv[]) {
    1013        // Resume falls back to terminate.
    1114        try {
    12                 throwResume (star){};
     15                throwResume (star){&star_vt};
    1316        } catch (star *) {
    1417                printf("caught as termination\n");
     
    1720        try {
    1821                loud_region a = "try block with resume throw";
    19                 throwResume (star){};
     22                throwResume (star){&star_vt};
    2023        } catch (star *) {
    2124                printf("caught as termination\n");
     
    2932        try {
    3033                try {
    31                         throw (star){};
     34                        throw (star){&star_vt};
    3235                } catchResume (star *) {
    3336                        printf("resume catch on terminate\n");
     
    4346        try {
    4447                try {
    45                         throwResume (star){};
     48                        throwResume (star){&star_vt};
    4649                } catch (star *) {
    4750                        printf("terminate catch on resume\n");
     
    5861                try {
    5962                        try {
    60                                 throw (star){};
     63                                throw (star){&star_vt};
    6164                        } catchResume (star *) {
    6265                                printf("inner resume catch (error)\n");
     
    7578                try {
    7679                        try {
    77                                 throwResume (star){};
     80                                throwResume (star){&star_vt};
    7881                        } catch (star *) {
    7982                                printf("inner termination catch\n");
     
    9497                                try {
    9598                                        printf("throwing resume moon\n");
    96                                         throwResume (moon){};
     99                                        throwResume (moon){&moon_vt};
    97100                                } catch (star *) {
    98101                                        printf("termination catch\n");
    99102                                }
    100103                                printf("throwing resume star\n");
    101                                 throwResume (star){};
     104                                throwResume (star){&star_vt};
    102105                        } catchResume (star *) {
    103106                                printf("resumption star catch\n");
     
    105108                } catchResume (moon *) {
    106109                        printf("resumption moon catch, will terminate\n");
    107                         throw (star){};
     110                        throw (star){&star_vt};
    108111                }
    109112        } catchResume (star *) {
Note: See TracChangeset for help on using the changeset viewer.