[Pharo-project] Ideas for CompiledMethod proxies?

Mariano Martinez Peck marianopeck at gmail.com
Sun Nov 21 15:51:43 CET 2010

On Sun, Nov 21, 2010 at 12:13 AM, Levente Uzonyi <leves at elte.hu> wrote:

> On Sat, 20 Nov 2010, Mariano Martinez Peck wrote:
>  On Sat, Nov 20, 2010 at 5:41 PM, Levente Uzonyi <leves at elte.hu> wrote:
>>> The only problem is that you can't swap-out a method that's used by the
>>> swap-in code.
>>>  Yes, but that's easy to solve. Before swapping everything, I "simulate"
>> the
>> swapping of a dummy CompiledMethod. During that, I mark all the
>> CompiledMethods that were used to perform that. And then, I exclude those
>> objects from being swapped :)
> That won't work, because during the simulation you'll only try a single
> execution path. Swapping in a real method may invoke methods that weren't
> used during the simulation. For example my implementation uses #storeString
> to serialize the methods and Compiler >> #evaluate: to deserialize them. So
> during deserialization a lot of different methods may be invoked.

Ahhh I got it....

Are you using Cog?  because with the SmallInteger I have the problem I
described with #run:with:in:

Last question....to use SmallIntegers, I need to put some methods in
SmallInteger, like #run:with:in:  , #doesNotUnderstand: ,  and all the
methods related to writing and loading back the original compiledMethod.  Of
course I can put all those methods under a category  *MyProxyPackage  ...
but I was thinking if there is another way. I would love to have
MySmallIntegerProxy that extends from ProtoObject (because I want my proxy
to understand as less messages as possible) and that is threated by the VM
like a SmallInetger, I mean, that it directly stores the number value in the
address, and put the last bit in 1.

Is this possible? how much work can it be?

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101121/51f4e4ca/attachment.htm>

More information about the Pharo-project mailing list