[Vm-dev] Re: [squeak-dev] Re: [Pharo-project] help needed with the new FFI plugin...

stephane ducasse stephane.ducasse at gmail.com
Fri Jul 22 09:06:24 UTC 2011


+1

On Jul 22, 2011, at 10:07 AM, Janko Mivšek wrote:

> Wow, Eliot, thanks for that so long waited function a lot!
> 
> Threaded FFI is namelly a must for Squeak/Pharo to be used seriously
> everywhere where a connection to the other worlds is needed. Which is a
> common situation when working on "enterprise" level information systems.
> 
> Thanks again! Thanks also to all investors/donators who invested to this
> so important work!
> 
> Janko
> 
> S, Eliot Miranda piše:
>> Hi All,
>> 
>>    today I committed the threaded FFI plugin along with the threaded VM
>> and hope to be able to support people in doing threaded FFI work on the
>> x86 platforms really soon now (Esteban, amongst others, this means you
>> ;) ).  But to put the image-level code that uses the new FFI plugin into
>> production the standard VM needs to be upgraded to not crash with the
>> ExternalFunction image changes the new threaded FFI plugin wants.  The
>> main change is that ExternalFunction changes size, gaining a stackSize
>> inst var which is used to tell the FFI plugin how much stack spacer to
>> reserve for marshalling (its computed on first use).  The best way for
>> this to happen is to start using the ThreadedFFIPlugin as the standard
>> plugin in the Interpreter VM. The ThreadedFFIPlugin overall is simpler
>> than the old FFI plugin (no assembler support code) and better (fully
>> reentrant).  But for this to happen we may need to implement the
>> platform=specific parts of the ThreadedFFIPlugin (still entirely
>> Smalltalk code) for PowerPC and ARM (and perhaps others, SPARC??).  I
>> understand what has to be done and I can explain it to anyone interested
>> in working on the problem, but I don't have any hardware with which I
>> can test the results so its pretty pointless my doing the work and
>> producing something inevitably broken.  So are there people out there
>> who would be interested in doing the port to PPC and ARM?  It means
>> fleshing out the classes 
>>    ThreadedARMFFIPlugin ThreadedFFICalloutStateForARM
>>    ThreadedPPCBEFFIPlugin ThreadedFFICalloutStateForPPC
>> and having a solid understanding of how alloca works to do stack
>> allocation and how the ABIs on ARM and PPC pass registers.
>> 
>> here's hoping there are a few good low-level people who would be interested.
>> Let me know.
>> -- 
>> best,
>> Eliot
>> 
> 
> -- 
> Janko Mivšek
> Aida/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si
> 



More information about the Vm-dev mailing list