[Pharo-project] Ideas for CompiledMethod proxies?

Mariano Martinez Peck marianopeck at gmail.com
Sat Nov 20 16:42:54 CET 2010


> A proxy actually should hold only some unique value (id), or as Eliot
> suggested be a unique by itself.
> This is enough to find a correspondence between any proxy and its
> original method.
>

Yes....but I was wondering if there was a way to use the same proxy instance
for everybody and using some conventions, guess which was the original
compiled method. Now that that seems not possible, I can use any of these
possibilities: id, identity, store class pointer, store a 4bytes array,
store the filename directly,  etc....




> You can simply delegate loading the method to some object, which
> 'knows' how to load a method and where it is stored:
>
> " id based lookup:  "
> Proxy>>literals
>  | method |
>  method := MethodsProxyManager methodFor: id.
>  ^ method literals
>
> "or identity based lookup: "
>
> Proxy>>literals
>  | method |
>  method := MethodsProxyManager methodFor: self.
>  ^ method literals
>
> > Thanks
> >
> > Mariano
> >
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101120/3a22e904/attachment.htm>


More information about the Pharo-project mailing list