On 21 November 2010 16:51, Mariano Martinez Peck <
marianopeck@gmail.com> wrote:
>
>
> On Sun, Nov 21, 2010 at 12:13 AM, Levente Uzonyi <
leves@elte.hu> wrote:
>>
>> On Sat, 20 Nov 2010, Mariano Martinez Peck wrote:
>>
>>> On Sat, Nov 20, 2010 at 5:41 PM, Levente Uzonyi <
leves@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,
>
> Mariano
>
>