[MLton] cvs commit: Fixed bug in refFlatten pass.

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Sun, 24 Jul 2005 12:33:48 +0300


Quoting Matthew Fluet <fluet@mlton.org>:
>   Fixed a bug in the refFlatten pass reported by Vesa Karvonen.  When an
>   Update statement was transformed, the value component was not propertly
>   translated.  This could yield an SSA2 IL type-error when the value was
>   itself flattenable.

The refFlatten pass does not preserve semantics in this case:

  vk@grape:12:27:43:~/work/sml/mlton/regression
  $ mlton
  MLton MLTONVERSION (built Sun Jul 24 11:29:47 2005 on grape)
  vk@grape:12:28:43:~/work/sml/mlton/regression
  $ mlton ref-flatten.6.sml && ./ref-flatten.6
  hi
  hi
  vk@grape:12:28:56:~/work/sml/mlton/regression
  $ mlton -drop-pass refFlatten ref-flatten.6.sml && ./ref-flatten.6
  hi
  vk@grape:12:29:08:~/work/sml/mlton/regression
  $

Only one "hi" should be printed.

-Vesa Karvonen