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

Igor Stasenko siguctua at gmail.com
Mon May 24 11:12:24 UTC 2010


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMT-methodClass-phase1.1.cs
Type: application/octet-stream
Size: 557 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100524/73fbaa1b/CMT-methodClass-phase1.1.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMT-methodclass-phase2.1.cs
Type: application/octet-stream
Size: 3038 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100524/73fbaa1b/CMT-methodclass-phase2.1.obj


More information about the Squeak-dev mailing list