[MLton-devel] cvs commit: unreachable blocks bugfix

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Wed, 21 Aug 2002 08:19:26 -0400 (EDT)


>   Modified:    mlton/ssa constant-propagation.fun shrink.fun shrink.sig
>                         type-check.fun useless.fun
>   Log:
>   Fixed a bug in constant-propagation and useless that was triggered when they
>   received an input with unreachable blocks.  Both passes would fail in such a
>   situation because they do analysis only on reachable blocks, but rewrite based
>   on unreachable ones.  The fix was to run a prepass to eliminate unreachable
>   blocks.

Just to point it out, this bugfix relies on running the shrinker _before_
the next type-check, else the check-scopes might fail.  This is exactly
the problem that Alain's code had -- a handler block that is unreachable,
but referenced by HandlerPush/HandlerPop.  Simply removing the unreachable
blocks is fine, but until the next shrink occurs, the
HandlerPush/HandlerPop's will remain.

The only pass that cares what labels are on HandlerPush/Pop is
removeUnused, but it's either dropping or rewriting the label, so its
fine.




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel