My understanding is that this exists only in the Newspeak VM sources. It is now reasonably easy to port to the standard and Cog VMs and the necessary primitive error code support is in the VMs and the image. I'm currently working in Newspeak at Cadence expect that this summer I will have the opportunity to port the Cog VM under Newspeak. At that point I'll be able to add the support to Cog and the standard VM.
There are now mechanisms in the VM which would allow one to include the immutability support conditionally, in which case the source could be included in the base VMs, and not have to live in a fork, which would be my preference. e.g.
storeAndPopReceiverVariableBytecode
"Note: This code uses storePointerUnchecked:ofObject:withValue: and does the
store check explicitly in order to help the translator produce better code."
| rcvr top |
<expandInCase: 'currentBytecode'>
"this bytecode will be expanded so that refs to currentBytecode below will be constant"
rcvr := receiver.
top := self internalStackTop.
self cppIf: Immutability
ifTrue:
[(self internalIsImmutable: rcvr) ifTrue:
[self internalPop: 1.
self internalCannotAssign: top to: receiver withIndex: (currentBytecode bitAnd: 7)].
"cannot fetch next bytecode until after immutability check so pc is correct (set to
following bytecode, not the bytecode after that) after attemptToAssign:withIndex:"].
self fetchNextBytecode.
rcvr < youngStart ifTrue:
[self possibleRootStoreInto: rcvr value: top].
self storePointerUnchecked: (currentBytecode bitAnd: 7) ofObject: rcvr withValue: top.
self internalPop: 1