On Wed, Jun 5, 2013 at 9:00 AM, John Cowan <cowan@x> wrote:
Alex Shinn scripsit:
Well, it depends what you mean by "boxed".
> As I see it, once a procedure escapes, the existence of any semantics
> in the language which can discriminate the procedure location requires
> it to be boxed. This is true whether the discriminator is eq? or eqv?.
It means that the location tag no longer has to be identified with the
unique address of the procedure. The procedure can be copied any number
of times (each of which is distinguishable by `eq?`), but the location
tag (which is what `eqv?` looks at) has to be copied with it; it can be
any arbitrary value at least as wide as an address.Sorry, I think I finally see what is being suggested.Is the idea basically to transform:(let ((f (lambda ...)))(... f ...)...(... f ...))into:(let ((f (lambda ...))(location (generate-unique-value)))(... (box f location) ...)...(... (box f location) ...))?Thus the escaped f's would not be eq? but could thelocation tag could be compared by eqv?.Using addresses wouldn't work, generate-unique-valuewould have to increment a global counter (which neednot be unique to this location). Though if the counterever overflows into a bignum all optimization is lost.--Alex
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports