Prim.entersRuntime vs Prim.runtimeTransfer

Stephen Weeks MLton@sourcelight.com
Sun, 30 Dec 2001 17:14:31 -0800


Upon further reflection and reading your email, here's the way I think
we should go.  

The closure converter will split blocks at Thread_copyCurrent only.
As far as I know, it is not necessary to split at the other prims
(MLton_halt, Thread_copyCurrent, Thread_switchTo, World_save) in order
for the SSA optimizations to be correct.

The translation from SSA to RSSA will split blocks at the following
prims, making them runtime transfers as well.
	GC_collect
	Thread_copy
	Thread_finishHandler
	Thread_switchTo
	World_save
Although "runtime" is maybe a bad name, splittig blocks at the above
prims is necessary because each of them needs to refer to a label just
after the primitive call.  I agree with your point about Thread_copy
-- it would be nice to move that split into a limit check.

The translation from SSA to RSSA will also split blocks so that
Array_array always occurs at the beginning of a block, so that a limit
check can be placed before it.

I'm not quite sure what to do about MLton_halt -- probably the right
thing is to add it as another kind of transfer, with no return label.