Ignore:
Timestamp:
Sep 7, 2021, 9:59:12 AM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
2bfee8e
Parents:
49b3389
Message:

Some clean-up to make Peter's changes to the exception benchmarks fit in better. And make test.sh a bit more robust.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/fixup-empty-f.cfa

    r49b3389 r812ba3d  
    22#include <clock.hfa>
    33#include <fstream.hfa>
    4 #include <stdlib.hfa>                                                                   // strto
     4#include <stdlib.hfa>
    55
    66void nounwind_fixup(unsigned int frames, void (*raised_rtn)(int &)) {
    77        if (frames) {
    88                nounwind_fixup(frames - 1, raised_rtn);
    9                 if ( frames == -1 ) printf( "42" );                             // prevent recursion optimizations
     9                // "Always" false, but prevents recursion elimination.
     10                if (-1 == frames) printf("~");
    1011        } else {
    1112                int fixup = 17;
     
    2425        }
    2526
     27        // Closures at the top level are allowed to be true closures.
    2628        void raised(int & fixup) {
    27                 fixup = total_frames + 42;                                              // use local scope => lexical link
    28                 if ( total_frames == 42 ) printf( "42" );
     29                fixup = total_frames + 42;
     30                if (total_frames == 42) printf("42");
    2931        }
    3032
Note: See TracChangeset for help on using the changeset viewer.