[squeak-dev] Re: [ANN][Squeak-dev Images] April 2008 versions

Andrew Tween amtween at hotmail.com
Sun Apr 6 17:17:57 UTC 2008


A bit more info...
When I run the FFIPlugin tests with Test Runner in sq3.10-7159dev08.04.1, I 
get one failure and one error.
This seems to be due to the monticello loader not running the package 
postscripts.

Manually evaluating,
   Smalltalk recreateSpecialObjectsArray
and re-running the tests results in no errors; all the tests pass.

Cheers,
Andy

"Andrew Tween" <amtween at hotmail.com> wrote in message 
news:ftapgb$ho2$1 at ger.gmane.org...
> Hi,
> "Andreas Raab" <andreas.raab at gmx.de> wrote in message
> news:47F890DC.2080203 at gmx.de...
>> Andrew Tween wrote:
>>>> "Rob Rothwell" <r.j.rothwell at gmail.com> wrote in message 
>>>> news:22f158f00804050827y254789fbjb8aac633a782acc4 at mail.gmail.com...
>>>> This would be great, but I really need FFI for ODBC, and I just can't 
>>>> get it to load into this image (3.10-7159)...
>>>
>>> please see - http://bugs.squeak.org/view.php?id=6952
>>>
>>> There you will find a patch, 
>>> ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st 
>>> , which, when installed, allows FFI version 3.9.1 to be loaded into the 
>>> squeak-dev and squeak-web images.
>>
>> Did you verify whether the result is correct? It is very easy to screw up 
>> the FFI and the result of those screwups are random crashes in the calls. 
>> I'm somewhat suspicious about that workaround because I don't see where 
>> ExternalType>>StructTypes would get installed if it isn't from 
>> #doneCompiling.
>
> The only verification I did was to run the Win32 FFI examples and check 
> they
> work ok.
>
> They way I understand it, StructTypes is initialized by the initialize
> methods, not by doneCompiling.
> doneCompiling calls ExternalType class>>noticeModificationOf: , which
> modifies the existing elements of StructTypes, but doesn't add any new 
> ones.
>
> My patch causes the loader to ignore errors in noticeModificationOf: 
> caused
> by StructTypes being nil.
> Later on, StructTypes is initialized to some kind of Dictionary, and
> noticeModificationOf: no longer causes any errors.
>
> I think that modifying ExternalType class>>noticeModificationOf: so that 
> it
> does nothing if StructTypes is nil would have the same effect and solve 
> the
> problem in much the same way. i.e.
>    noticeModificationOf: aClass
>         "A subclass of ExternalStructure has been redefined.
>         Clean out any obsolete references to its type."
>     | type |
>    StructTypes isNil ifTrue:[^self].
>    ...
>
> There is no value in setting StructTypes to a Dictionary at this point 
> since
> we know that a future initialize will overwrite it with an empty 
> Dictionary.
> And we know that that intialize hasn't already run, or StructTypes 
> wouldn't
> be nil.
> And we know that nothing has tried to add an entry to StructTypes, or a
> different error would have occured during loading.
>
> Having said all that, I could easily be missing something here, and you 
> are
> right to be suspicious ;)
> Cheers,
> Andy
>>
>> Cheers,
>>   - Andreas
>
>
>
> 





More information about the Squeak-dev mailing list