[gclist] Name that hypothesis

Nick Barnes nickb@harlequin.co.uk
Wed, 04 Dec 1996 10:51:41 +0000


> We (the Mercury compiler implementors) are currently working on
> "LCMCA" (last call modulo constructor application) optimization.

Interesting. So you receive results by reference? In pseudo-ML:

	fun foo 0 = [] | foo n = n :: (foo (n-1))

	=>

	fun foo' (p,0) = (p := [])
	  | foo' (p,n) = (p := new_cons();
	                  car(p) := n;
			  foo' (&cdr(p), n-1))

	?

(this is getting a little off-topic for GC-list).

Nick B