[squeak-dev] Crypto Plugins on Cog

Levente Uzonyi leves at elte.hu
Wed Sep 8 11:25:07 UTC 2010


On Tue, 7 Sep 2010, Rob Withers wrote:

>
>
> --------------------------------------------------
> From: "Levente Uzonyi" <leves at elte.hu>
> Sent: Tuesday, September 07, 2010 8:23 PM
> To: <squeak-dev at lists.squeakfoundation.org>
> Subject: Re: [squeak-dev] Crypto Plugins on Cog
>
>> Quoting Rob Withers <reefedjib at gmail.com>:
>> 
>>> Sorry for the delay Levente.  I finally made time to look into this.
>>> 
>>> I had to rename the methods because two Classes had the same method names 
>>> and the gcc linker, I imagine, had problems with it.   With my fixes, all 
>>> four Plugins build with Cog.
>> 
>> That's strange, because I already compiled the plugins for Cog and I didn't 
>> have such issue. Did you try to build the plugins as internal?
>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-July/152005.html
>
> Yes, they were internal.

Well, I can imagine that the linker is unhappy with the same function 
names in that case.

>
>> 
>>> 
>>> I looked again, into history and I don't see any category or method 
>>> comments.
>> 
>> MD5Plugin >> md5ProcessBuffer: buffer withState: state
>> "This method is generated. See #compileMethods on the class side."
>> ...
>
> I missed it somehow.  I was looking at md5InitializeState.
>
>> 
>> Also the method's category is "generated".
>> 
>>> 
>>> What is this about something generating these methods?  Why?  I am  sure 
>>> there must be a good reason, though I cannot think of one at  the moment.
>> 
>> Just look at the body of this method, and you'll see why.
>> 
>
> Yep.  How's this correction?
>
> processBufferWithStateHeader
>
> 	^ 'md5ProcessBuffer: buffer withState: state
> ...

That'll will do it. Note that there's another generated method.


Levente

>
> Rob
>
>> 
>> Levente
>> 
>>> 
>>> Cheers,
>>> Rob
>>> 
>>> --------------------------------------------------
>>> From: "Levente Uzonyi" <leves at elte.hu>
>>> Sent: Tuesday, September 07, 2010 2:30 AM
>>> To: "The general-purpose Squeak developers list" 
>>> <squeak-dev at lists.squeakfoundation.org>
>>> Cc: "Squeak Crypto" <cryptography at lists.squeakfoundation.org>
>>> Subject: Re: [squeak-dev] Crypto Plugins on Cog
>>> 
>>>> On Sun, 5 Sep 2010, Rob Withers wrote:
>>>> 
>>>>> I did some rework so that all plugins build on Cog.  This mainly 
>>>>> entailed pulling MD5Plugin from a previous version and renaming several 
>>>>> methods implemented with the same name in MD5Plugin and SHA256Plugin. 
>>>>> The version is
>>>> 
>>>> What was the point of renaming those methods? In MD5Plugin those methods 
>>>> are generated as the category and the method comment  states. So renaming 
>>>> them without changing the code that generates  those methods is not a 
>>>> good idea.
>>>> Also the codegenerator should be updated a bit. It should generate  code 
>>>> for both litte- and big-endian machines and the C compiler  should decide 
>>>> which method to use based on the platform, so the C  code can be shared.
>>>> The current code in the package is generated for 32-bit  little-endian 
>>>> machines (it may work for 64-bit but that has to be  checked).
>>>> 
>>>>> the latest with 'oscog' as the initials.
>>>> 
>>>> I think that the plugin code (Smalltalk) should be the same for SqueakVM 
>>>> and CogVM, using the non-pragma declarations.
>>>> 
>>>> 
>>>> Levente
>>>> 
>>>>> 
>>>>> All test pass GREEN.
>>>>> 
>>>>> Rob
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
>> 
>> 
>> 
>
>



More information about the Squeak-dev mailing list