Hi Doru,
On Jan 4, 2016, at 7:42 AM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
The VM (both Cog and Spur) supports basic manipulation of objects without relying on sending messages to those objects. These primitives are meant to be handled by methods in Context. Eliot provided a changeset with these methods, and they are not yet in Pharo:
object: anObject basicAt: index object: anObject basicAt: index put: value object: anObject eqeq: anOtherObject object: anObject instVarAt: anIndex object: anObject instVarAt: anIndex put: aValue object: anObject perform: selector withArguments: argArray inClass: lookupClass objectClass: anObject objectSize: anObject
I added an issue and the slice: https://pharo.fogbugz.com/f/cases/17313/Missing-primitive-methods-in-Context
As I note in the issue, I think it is certainly interesting to have a more powerful mirrors mechanism, but until then we should still be able to use what the VM already provides.
Note that a more powerful mirror implementation is still built upon these same primitives. Newspeak has a rich mirror implementation, but underneath it still uses these primitives to reach u side of objects without sending them messages.
I would like to use these primitives now to make the GT Inspector and Debugger be able to work with ProtoObject. I thought these methods were supposed to be in the Spur version of Pharo, but it seems they are not. So, I am wondering if maybe I am not missing something. Am I missing something or should we integrate these methods?
I can see no reason for delay. Remember that they should be used not only in low level inspectors but in Context's execution simulation machinery. Squeak can be used as a model, although in squeak there is still the ContextPart/MethodContext split.
Cheers, Doru
Happy new year!
www.tudorgirba.com www.feenk.com
"Problem solving efficiency grows with the abstractness level of problem understanding."
_,,,^..^,,,_ (phone)