In the portable assembly language C--, as in higher-level
languages, the back end has complete control of the call stack and the
allocation of activation records.
This note explores the consequences of moving that control from the
back end to the front end.
The exploration is motivated by three problems:
The desire to enable a procedure f to make a varargs call to an
unknown procedure g, which in turn makes a tail call to h.
By the time control reaches h, the arguments that f passed to g
should have been deallocated.
This scenario is not possible in the September 1999 version of C--.
The desire to give the front end control over handling of stack
overflow and stack underflow, for purposes of implementing user-level
concurrency.
The desire to be able to implement continuation-passing style, with
heap-allocated activation records, over the same implementation of
C-- that is used for more traditional procedure-call mechanisms.