caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* live variables
@ 2001-01-12 18:02 Charles Martin
  2001-01-15 15:22 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Martin @ 2001-01-12 18:02 UTC (permalink / raw)
  To: caml-list

I would like to follow up to the mailing list a series of posts on 
comp.lang.functional.  Jerome Vouillon explained that the native code 
compiler compiles

	let rec foldl f q = function
	| [] -> q
	| x :: xx -> foldl f (f q x) xx

as if it were written

	let rec foldl f q = function
	| [] -> q
	| l ->
	  let x = List.hd l in
	  let r = f q x in
	  let xx = List.tl l in
	  foldl f r xx

As Daniel Wang points out, this does not preserve the basic liveness 
properties of the original program.  As he asked on the newsgroup, is there 
a deep reason for this, or is this just a bug that has yet to be fixed?

Charles



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-01-16 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-12 18:02 live variables Charles Martin
2001-01-15 15:22 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).