Changeset 18783b4 for doc/theses/andrew_beach_MMath/code/fixup-empty-r.cfa
- Timestamp:
- Sep 4, 2021, 10:34:43 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 49b3389
- Parents:
- f450f2f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/fixup-empty-r.cfa
rf450f2f r18783b4 10 10 vtable(fixup_exception) fixup_vt; 11 11 12 intnounwind_empty(unsigned int frames) {12 void nounwind_empty(unsigned int frames) { 13 13 if (frames) { 14 int rtn = nounwind_empty(frames - 1); 15 if ( rtn == 42 ) printf( "42" ); // make non-tail recursive 16 return rtn; 14 nounwind_empty(frames - 1); 15 if ( frames == -1 ) printf( "42" ); // prevent recursion optimizations 17 16 } else { 18 17 int fixup = 17; 19 18 throwResume (fixup_exception){&fixup_vt, fixup}; // change bad fixup 20 return fixup;21 19 } 22 20 }
Note: See TracChangeset
for help on using the changeset viewer.