Changeset 812ba3d for doc/theses/andrew_beach_MMath/code/fixup-empty-f.cfa
- Timestamp:
- Sep 7, 2021, 9:59:12 AM (19 months ago)
- Branches:
- enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 2bfee8e
- Parents:
- 49b3389
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/fixup-empty-f.cfa
r49b3389 r812ba3d 2 2 #include <clock.hfa> 3 3 #include <fstream.hfa> 4 #include <stdlib.hfa> // strto4 #include <stdlib.hfa> 5 5 6 6 void nounwind_fixup(unsigned int frames, void (*raised_rtn)(int &)) { 7 7 if (frames) { 8 8 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("~"); 10 11 } else { 11 12 int fixup = 17; … … 24 25 } 25 26 27 // Closures at the top level are allowed to be true closures. 26 28 void raised(int & fixup) { 27 fixup = total_frames + 42; // use local scope => lexical link28 if ( total_frames == 42 ) printf( "42");29 fixup = total_frames + 42; 30 if (total_frames == 42) printf("42"); 29 31 } 30 32
Note: See TracChangeset
for help on using the changeset viewer.