[Vm-dev] Having a specific class for temp vectors
stephane.ducasse at gmail.com
Sat Nov 21 14:16:39 UTC 2015
bringing more stability is good to me.
Reducing the number of ways we can break the system is nice. Especially when the solution is simple.
On 21 Nov 2015, at 12:46, Clément Bera <bera.clement at gmail.com> wrote:
> Hello everyone,
> 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 ?
More information about the Vm-dev