[Vm-dev] Re: Method invocation in Slang

John M McIntosh johnmci at smalltalkconsulting.com
Wed Feb 6 17:59:22 UTC 2008

eliot.miranda at gmail.com
had sent a note out last Nov talking about work on FFI and callbacks,  
you might want to contact him for more information.

> Hi All,
> .....because I've just complete an initial prototype of a simple FFI  
> for x86 at Cadence.

> The system supports callbacks.  I believe it will be reasonably easy  
> to port across 32-bit processors.  ABI features such as the x86-64  
> ABI's splitting of structure contents across integer and floating- 
> point registers is considerably more problematic.  But calls  
> involving integer data should port easily.
> Since call-outs use alloca the FFI is considerably simpler than  
> Andreas's, and hence slightly faster.  The use of alloca is feasible  
> on RISC processors also, this based on my experience with  
> VisualWorks.  I can provide a porting guide if you're interested in  
> taking this further.
> The current system is implemented as a plugin supported by four new  
> functions on Interpreter all of which support callbacks (these are  
> variants of internalActivateNewMethod and lookupMethodInClass and a  
> couple of methods for creating the activation of a send and  
> reestablishing the callout context on returning from a callback).

On Feb 6, 2008, at 9:26 AM, Robert Krahn wrote:

>> What are you actually trying to accomplish? Possibly Andreas'  
>> callback support is what you need.
> We are actually trying to find an easy way to use callbacks. The  
> method invocation would be triggered from outside the VM. But since  
> the callbacks are probably synchronous we don't have to use  
> callbacks into the VM at all. If that will not work, we will follow  
> Andreas' proposal and use semaphores. One thing I am interested in  
> concerning this is how are parameters normally passed to the  
> callbacks when using semaphores? By manipulating the stack?

John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com

More information about the Vm-dev mailing list