[MLton-user] Does GC always trigger MLtonFinalizable?

Matthew Fluet fluet at tti-c.org
Sun Feb 18 09:42:50 PST 2007


Henry Cejtin wrote:
> When you (Matthew) said that `all the globals must be live', you didn't really
> mean that I am sure.

Well I did mean that, but for a different notion of globals.  It is 
certainly true that the garbage collector always considers (the array of 
object pointers pointed to by) gcState.globals to be garbage collection 
roots (i.e., live).  And, the array of object pointers corresponds to 
the 'globals' components of programs in the SSA and SSA2 ILs and Global 
operands in the Machine IL.

However, the SSA globalization pass is very careful to promote only 
small objects to globals.  That is, top-level variable bindings are not 
necessarily denoted by globals.





More information about the MLton-user mailing list