[Vm-dev] Re: [Vm-beginners] About Primitives
bert at freudenbergs.de
Sat May 26 12:01:08 UTC 2012
On 26.05.2012, at 10:38, Mariano Martinez Peck wrote:
> On Sat, May 26, 2012 at 3:21 AM, Sean P. DeNigris <sean at clipperadams.com> wrote:
> Mariano Martinez Peck wrote
> > yes it receieves! two arguments indeed
> plus self is passed implicitly first, right?
> You see? we start to help us each other :)
> yes, the receiver is always put in the stack "implicitly"
And and self is put on the stack firs, then the other arguments. So if the primitive only wants to return self, it just pops the 2 arguments off the stack. If it needs to return something else, it also has to pop off self.
> How did you "browse the image" for the primitive? I ended up searching
> sources for "<primitive: 249>". Is there a better/faster way?
> That's one slow possibily and the hacky and fast one is: CompiledMethod allInstances select: [:each | each primitive = 249]
Or the less hacky, equally fast
SystemNavigation default browseAllSelect: [:m | m primitive = 249]
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev