[Vm-dev] Special objects array - sometimes everybody cannot be
andreas.raab at gmx.de
Tue May 25 04:31:45 UTC 2010
On 5/24/2010 8:56 PM, David T. Lewis wrote:
> Would anyone object to the following allocation of slots in the special
> objects array? This would leave Alien mostly unaffected, but would require
> Igor's finalization improvements to put WeakFinalizer at position 55 in
> the special objects array, and it would require that the Alien override
> be pulled into the VMMaker package such that all VMs would have the Alien
> assignments in the special objects array (albeit unused in many cases).
> And recreateSpecialObjectsArray would need updates to match of course.
That sounds fine. Go for it.
> I seem to recall some discussion of a more flexible special objects
> registry, although I can't find it right now. Pointers welcome.
The discussion evolved around the issue that plugins shouldn't have the
need to modify the splObjs array for precisely the reasons we're seeing
here. The splObjs are reserved for the VM and plugins can and absolutely
should use their own registry mechanism. Historically, this wasn't
possible due to not being able to GC-protect stuff in a plugin, but I
added that feature a while back so that a plugin can GC-protect variable
locations and consequently, plugins can hold onto references directly.
More information about the Vm-dev