limit checks

Stephen Weeks MLton@sourcelight.com
Wed, 9 Aug 2000 08:43:42 -0700 (PDT)


> > Actually, this reminds me, since RCPS is gonna know about object sizes and the
> > like, it would be nice if we could express limit checks in that IL (an all the
> > basic blocks associated with them).  It would be even nicer if the "type system" 
> > could check that the limit checks are sufficient.
> 
> Interesting.  Doesn't sound too difficult, simply sum up the sizes of all
> types associated with an allocation and make sure that's equal to the
> limit check size.

It's slightly trickier than that, since limit checks are coalesced together.  So 
you really have to do a dataflow analysis.  But it's no trickier than verifying
liveness, initializedness, or handler stacks.