Ignore:
Timestamp:
Sep 16, 2021, 2:22:01 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
432bffe, 7e7a076
Parents:
a8367eb (diff), 140eb16 (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
  • doc/theses/andrew_beach_MMath/code/fixup-empty-r.cfa

    ra8367eb r4d8fbf4  
    33#include <exception.hfa>
    44#include <fstream.hfa>
    5 #include <stdlib.hfa>                                                                   // strto
     5#include <stdlib.hfa>
    66
    77exception fixup_exception {
     
    1010vtable(fixup_exception) fixup_vt;
    1111
    12 int nounwind_empty(unsigned int frames) {
     12void nounwind_empty(unsigned int frames) {
    1313        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                // "Always" false, but prevents recursion elimination.
     16                if (-1 == frames) printf("~");
    1717        } else {
    1818                int fixup = 17;
    19                 throwResume (fixup_exception){&fixup_vt, fixup}; // change bad fixup
    20                 return fixup;
     19                throwResume (fixup_exception){&fixup_vt, fixup};
    2120        }
    2221}
Note: See TracChangeset for help on using the changeset viewer.