[squeak-dev] [ENH] CompiledMethodTrailer with a different CompiledMethod class

Hernán Morales Durand hernan.morales at gmail.com
Mon May 24 17:12:04 UTC 2010


Thanks, I've tested and it worked fine.
Cheers,

Hernán

2010/5/24 Igor Stasenko <siguctua at gmail.com>:
> Hello,
> i added a simple enhancement to make CompilerMethodTrailer to be more
> friendly with
> CompiledMethod subclasses.
> It provides an additional method #createMethod:header:methodClass:
> which allows to create a compiled method with other class, than a
> CompiledMethod.
>
> Installing it requires 2 separate phases:
> phase1  - adds #createMethod:header:methodClass:  method
> phase2 - puts this method in use.
>
> if you merge these changesets, you'd will run into a problem, because
> filein/fileout utility does not honors the order of changes, how they
> should be applied.
>
>
> On 24 May 2010 13:27, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
>> and send us the fix for inclusion :)
>>
>> On May 24, 2010, at 10:54 AM, Igor Stasenko wrote:
>>
>>> On 24 May 2010 10:31, Hernán Morales Durand <hernan.morales at gmail.com> wrote:
>>>> Hello
>>>>
>>>> Just to make a little note. I'm adapting the lightweight classes
>>>> package to work with CompilerMethodTrailer. In this method
>>>>
>>>> CompiledMethodTrailer>>createMethod: numberOfBytesForAllButTrailer
>>>> header: headerWord
>>>>        | meth |
>>>>        encodedData ifNil: [ self encode ].
>>>>        meth := CompiledMethod newMethod: numberOfBytesForAllButTrailer +
>>>> size header: headerWord.
>>>>        ...
>>>>
>>>> I need to answer a different kind of CompiledMethod, it would be nice
>>>> if my own CompiledMethod class could be specified in some way to make
>>>> the CompiledMethodTrailer more flexible.
>>>
>>> Yes, you could add a class parameter, so method will take 3
>>>
>>> createMethod: numberOfBytesForAllButTrailer header: headerWord class:
>>> aMethodClass
>>>
>>>> Cheers,
>>>>
>>>> Hernán
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project at lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project at lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project at lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>
>
>



More information about the Squeak-dev mailing list