[Vm-dev] VMMaker : Inlining loop with MiscPrimitivesPlugin on
Pharo
Andreas Raab
andreas.raab at gmx.de
Tue Nov 3 17:01:43 UTC 2009
My only issue is the awkward naming convention. A primitive doing foo
should be called primitiveFoo not fooViaPrimitive. So if you want to
rename it to primitiveFindSubstring:in:startingAt:matchTable: that'd be
fine with me.
Cheers,
- Andreas
David T. Lewis wrote:
>
> On Tue, Nov 03, 2009 at 11:46:50AM +0100, arnaud Jean Baptiste wrote:
>> the MiscPrimitivesPlugin loop when generating.
>>
>> the cause is :
>>
>> the primitives: #findSubstring:in:startingAt:matchTable:
>> was change to the primitive that name is now:
>> #findSubstringViaPrimitive:in:startingAt: matchTable:
>>
>> i can simply change the name in #translatedPrimitives
>> (MiscPrimitivePlugin ) method but i am looking for long term solution.
>>
>
> Good question.
>
> Pharo is doing this in ByteString:
>
> findSubstring: key in: body startingAt: start matchTable: matchTable
> key isWideString ifTrue: [^super findSubstring: key in: body startingAt: start matchTable: matchTable].
> ^self findSubstringViaPrimitive: key in: body startingAt: start matchTable: matchTable
>
> I am not familiar with WideString usage, perhaps someone can comment as
> to whether the the #findSubstringViaPrimitive:in:startingAt:matchTable: is
> likely to be adopted in Squeak generally. If yes, then we should probably
> change MiscPrimitivePlugin class>>translatedPrimitives to look for that
> selector if present in the image. Or perhaps the check for WideString
> belongs in the primitive itself?
>
> Dave
>
>
More information about the Vm-dev
mailing list