Loop handle

James Thorpe james at thorpeweb.com
Sat Apr 10 15:01:02 PDT 2010


If CPS is out - what about passing the loop condition and body into a  
function that does the looping for you.

in pseudo code

  defn loop_fn(cond, body)
	while (cond()) do
		body()
	end
end

this avoids the need for tail calls entirely - and I presume the whole  
lot could be inlined.

James.


More information about the mlvm-dev mailing list