limit check insertion
Matthew Fluet
fluet@CS.Cornell.EDU
Thu, 13 Dec 2001 10:43:21 -0500 (EST)
> > With regards to exposing address arithmetic (in array references and
> > the like) this strikes me as a big win. Some day we want to have
> > things like replacing array subscripting with induction variables
> > that are pointers, and even barring that it is probably not hard to
> > expose the common sub-expression which is multiplying by array
> > element size in something like an array copy.
>
> Yeah, it will be interesting to try to get around the problems caused
> with interactions between the gc and having pointers into an array --
> and even expressing that in the type system.
Steve and I talked a little bit about this over the summer. A quick
brainstorm suggested something like "relative pointers", which would be
distinct from "object pointers". The idea was that each relative pointer
was a pointer relative to some object pointer; when the GC updated an
object pointer from from-space to to-space, it would adjust all relative
pointers to have the same relative position to the object pointer.
Expressing somthing like that in the type system seems to require some
sort of dependent types.