Return Graph varies from Call Graph?
Jim Harkins
jharkins at sagpd1.UUCP
Thu Jun 7 06:03:58 AEST 1990
In article <1990Jun5.142836.9821 at msuinfo.cl.msu.edu> reid at cpswh.cps.msu.edu (Dr Richard J. Reid) writes:
>Do you have any suggestions about how to vary the
>return graph of function invocation from the call graph?
Lots of them, but this is a family newgroup :-)
> Given the call sequence: A -> B -> C -> D
>
> Can the return sequence be: A <- C <- B <- D ?
I don't really see why you would want to do this. If you did do it I think
that, once maintanance is factored in, you're much better off coming up with a
better algorithm for what you're trying to do.
A slightly more palatable thing to do would be to change the return sequence
to A <- B <- D (using your call sequence). Then all you do is figure out how
many doo hickeys get put onto the stack when your C compiler does a function
call (can you say 'implementation dependent'. I knew you could), then write
some in-line assembly to adjust the stack pointer. Me? If I ended up
maintaining code that did this sort of thing I'd look for a bucket of tar and
some feathers.
--
jim jharkins at sagpd1
I hate to see you go, but I love to see you walk away.
More information about the Comp.lang.c
mailing list