[Vm-dev] Having a specific class for temp vectors
bera.clement at gmail.com
Sat Nov 21 11:46:21 UTC 2015
This is the second time I have issues with temp vectors. They are internal
to the runtime but are exposed to the programmer. The problem is that the
runtime have expectations with the temp vectors that the programmer could
break, crashing the VM.
The first thing in Spur is that temp vectors can through the become
primitive be a forwarding object, which crashes the VM as remote temporary
variable stores do not check if the temp vector is a forwarder.
The second thing, now that I am working with immutability (VW's
immutability), is that temp vectors could be marked as immutable and the
runtime does not check at each remote temp store if it is immutable.
What I would like is to have a specific subclass of Array, likely to be
called TempVector, and have temp vectors be an instance of TempVector
instead of Array. Then the VM could easily check is an object is a temp
vector and fail the become primitive or the setImmutability primitive.
I think this should be exposed in the image. It would mean having the
TempVector class in the special object array.
What do you think ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev