[Vm-dev] Building OSProcessPlugin on macs
David T. Lewis
lewis at mail.msen.com
Thu Jul 7 15:00:19 UTC 2011
On Thu, Jul 07, 2011 at 02:30:13PM +0200, Igor Stasenko wrote:
> On 7 July 2011 14:22, David T. Lewis <lewis at mail.msen.com> wrote:
> > On Thu, Jul 07, 2011 at 05:36:51AM +0200, Igor Stasenko wrote:
> >> the problem with above code that it doesn't tells code generator to
> >> keep sendSignalToPids method around,
> >> instead of pruning it since nobody using it.
> >> That's why in hydra i added this special asCIdentifier to not only
> >> convert symbol to identifier (instead of quoted C string)
> >> but also make sure that if given symbol matching the method name ,
> >> then make sure that this method won't be pruned.
> > I don't understand why this was a problem in hydra. The method is
> > referenced from #initialiseModule, and is not pruned by the code
> > generator for that reason.
> i'm not talking about this particular case. Sometimes the only
> reference where function is used is in passing an address to function.
> Which, if you don't have asCIdentifier cannot be detected, because its
> in cCode: clause.
Oh, now I understand. Yes you are right.
> > I am not saying that writing "self atexit: #sendSignalToPids asSymbol"
> > is wrong, but you would be hard pressed to convince me that it is
> > easier to read and understand.
> well, it could be understood as passing a selector to perform it later..
> needless to say, that such pattern are quite common in smalltalk(s),
> for events, handlers , subscriptions etc etc
That's a fair point.
> > Note that the "self atexit: ..." change exists only in the oscog
> > branch. I don't know the motivation for that change, so maybe I'm
> > missing something.
> no idea either.. i just happy that it works now :)
Thanks, me too :)
More information about the Vm-dev