Leopold Toetsch wrote:
Am Mittwoch, 11. April 2007 00:25 schrieb Allison Randal:
3) Modify the core PMC implementation so it tracks information about
which the different containers (registers, temporary variables,
namespace entries, etc.) that hold a particular PMC, and which
particular container was used to make the method call, so a method call
can modify the variable it was called on. Disadvantage: This isn't a
generally useful feature. (Not my favorite alternative.)
I'm just answering 3):
Another "container" might be (external) C code (incl. the C stack). You can't
track that in above terms. This all boils down to the same implications
imposed by the conservative GC. You can never be sure, it's a variable (e.g.
integer looking like a mem addr) or just a real memory location you were
tracking, which means: modifying adjacent (maybe inside the very PMC or not)
memory regions could be disastrous.
Mmmmm... did I neglect to mention other Disadvantage?: It's a horrible
solution. Possible (with additional layers of indirection, containers
within containers, etc), but horrible.
Allison