[squeak-dev] modifying instance variable allocation
nicolas.cellier.aka.nice at gmail.com
Mon May 2 05:42:17 UTC 2022
Indeed, the VM is cheating, and for obvious efficiency reasons don't send
the message instVarAt:. You would need to define a specific Compiler to
encode the inst var access with other bytecode sequences.
Le lun. 2 mai 2022, 03:08, Lauren Pullen <drurowin at gmail.com> a écrit :
> Hi list,
> I'm trying to make an object that has special instance variable
> allocation methods by overriding #instVarAt: and #instVarAt:put:, but it
> isn't working.
> In an inspector, the fields are presented as expected, but the
> #pushRcvr: and #popIntoRcvr: bytecodes seem to use the basic behavior.
> #instVarAt: and #instVarAt:put: aren't labeled 'No lookup.' like #== is,
> but the VM bytecode evaluator doesn't use them for instance variable
> access so the overridden the new behavior only works in the simulator...
> which includes everything from inspectors to fileIn/Out and bytecode
> Is this something you can do? or are you required to use custom getter
> and setter methods?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev