[Vm-dev] tempVectors use case and current issues

Levente Uzonyi leves at caesar.elte.hu
Thu Mar 28 21:57:50 UTC 2019


Just because you have got a hammer, it doesn't mean you have to use it to 
solve this task. Instead of trying to mangle the way the VM handles this, 
you should just change the compiler to emit #at: and #at:put: instead of 
the temp vector bytecodes.
Implementing this idea could open up new possiblities. For example, you 
could use custom selectors like #remoteTempAt:, which you could be 
implemented by your proxies besides Array. Or you could introduce an 
Array-like class to act as temp vectors and keep Array clean of these 
methods.
By the way, any kind of change to these primitives means that the 
atomicity guarantees the VM currently provides are gone if the temp vector 
is "remote".

Levente


More information about the Vm-dev mailing list