Scheme front end for egcs.

Jeffrey A Law law@cygnus.com
Sat Apr 4 20:05:00 GMT 1998


  In message < 873efv83lo.fsf@gauss.muc.de >you write:
  > Scheme requires functions to be properly tail recursive and many
  > programs rely on this.  Therefore the Scheme equivalent to the
  > following program
Ouch.  Yup, that's going to be tough.  There were some patches (I 
still have them) to implement a more general tail call optimization,
but they need serious work before they'd be useful.  Even so, they
may not be complete enough to help with your problem.


  > Personally I would prefer option 1, but I would be interested in your
  > opinions.  How would different calling conventions be reflected in the
  > tree language?
Can't really comment on the different conventions, I don't have the
time to sit down and analyze them in detail.

Calling conventions are not generally represented at the tree level
other than to say "this call has these args" and "this function
expects these args".  The details of where to put args are controlled
by FUNCTION_ARG and related macros.   Look in calls.c (caller) and
function.c (callee).

  > Scheme has first-class continuation which require some manipulations
  > of the stack.  Is there a portable way to find the base of the stack,
  > to walk the stack and to copy parts of the stack to/from the heap?
Not really.  Just walking the stack is tough enough :-)  Just ask the
C++ folks doing exception handling.

jeff



More information about the Gcc mailing list