Java/JVM doesn't have become: which is something that helps a lot in Smalltalk being Smalltalk.
Object>>become: otherObject
������ "Primitive. Swap the object pointers of the receiver and the argument.
������ All variables in the entire system that used to point to the
������ receiver now point to the argument, and vice-versa.
������ Fails if either object is a SmallInteger"
������ (Array with: self)
������ ������ elementsExchangeIdentityWith:
������ ������ ������ (Array with: otherObject)
You can't do that in Java/JVM it seems.
That is also what is used (well, there is another primitive (72) when one changes all fo the code around in the Browser.
Check
SlotClassBuilder>>migrateClasses
PharoClassInstaller>>migrateClasses:to:using:
and Array>>elementsForwardIdentityTo:
elementsForwardIdentityTo: otherArray
������ "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray.�� The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation."
������ <primitive: 72>
������ self primitiveFailed
As become: and elementsForwardIdentityTo: are doing all of this in the VM, which apparently the JVM doesn't do.
That's why a Smalltalk on the JVM will not "really" be a Smalltalk if this characteristic isn't there. Yes, there will be bytecode, yes, there will be syntax. But there will be no magic.
HTH
Phil