nontail Bug continuations

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Mon, 12 Nov 2001 15:23:34 -0500 (EST)


> Here are the 9 cases that I see.

Cont	Handler		note
------	-------		----------------------------------------------------
None	None		tail call to nonreturning, nonraising function
None	Caller		tail call to nonreturning function that may raise
None	Some h		backend generates nontail stub
Caller	None		illegal, because the callee must restore the exnStack
Caller	Caller		tail call with no handler
Caller	Some h		backend generates nontail stub
Some l	None		nontail call to nonraising function
Some l	Caller		nontail call with no handler
Some l	Some h		nontail call with handler

Why is Caller/None illegal?  

> As an aside, I was also thinking we should consider adding in "may
> raise" and "may return" as part of SSA function types so that the cont
> and handlers can be type checked.  

No objections;  Probably easiest would be to make the returns field in
Function a Type.t vector option.