Re: [Pharo-project] Alien FFI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] Alien FFI

johnmci

Ok, after much mindless poking, cross checking and testing, retesting,  
writing sunits today I  can say the Alien FFI logic is mostly ported  
into Pharo.

In the http://www.squeaksource.com/Alien.html MC library

I would suggest someone with an eye towards "Compiler, CompileMethod,  
ParseNode" carefully look at the changes in "Alien-Core" to ensure  
I've not trashed some important part of the Pharo Compiler or Traits.  
I can't say if the changes are destructive or passive?

you will find:

For VMMaker folks

Alien-VMMaker-Support   which provides the changes to the latest  
VMMaker  from squeaksource to build a Alien aware VM.
Alien-VMMaker-Plugins   which is the plugin logic

For users of Alien

Alien-Core-First - Load this first otherwise you'll get a parsing  
error later
Alien-Core -   Load this next, Compiler changes etc..
Alien-LibC - LibC support for os-x/unix/windows
Alien-CoreTest - SUnits

Optional stuff then is

Alien-MacOSX-Core - Objective-C interface
Alien-MacOSX-AppKit- Objective-C application api
Alien-MacOSX-Examples- Objective-C examples
Alien-Win32 - Windows examples.

Lastly load

Alien-Last-Class-Initialize - To ensure all the initializers were run,  
just in case MC loses it's mind...


Oh and you need a plugin and a VM.   It's midnight again and I don't  
have one compiled up for distribution, Monday's chore...
Anyway you should be able to load the source code, point/learn about  
how it's used.

Someone will have to build a Unix one, and a Windows one.

For the moment there is NO powerpc version since that requires a bit  
of icky assembler. Same for the iPhone btw (icky ARM assembler).

On 23-Nov-08, at 4:20 AM, Stéphane Ducasse wrote:

> the future looks shining :)
>
> Stef

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] Alien FFI

johnmci
 
Ok, well asAlien seems to be used as conversion methods to ensure a  
passed object is an alien.
What would you like to do instead?

I'll integrate the primitive Error code changes this week and do any  
clean up.
If you would like to suggest which variable bindings  can be deleted  
I'll correct that.

On 24-Nov-08, at 9:49 AM, Vassili Bykov wrote:

> On Mon, Nov 24, 2008 at 12:13 AM, John M McIntosh
> <[hidden email]> wrote:
>> I would suggest someone with an eye towards "Compiler, CompileMethod,
>> ParseNode" carefully look at the changes in "Alien-Core" to ensure  
>> I've not
>> trashed some important part of the Pharo Compiler or Traits. I  
>> can't say if
>> the changes are destructive or passive?
>
> Many of those have to do with primitive errorCode support, and it
> would be nice to categorize them separately. I didn't look closely,
> but those that have to do with variable bindings are likely to be
> irrelevant.
>
> And sorry, but adding #asAlien to True, False and UndefinedObject is
> just wrong. Nor should have it been in String from the start.
>
> Cheers,
>
> --Vassili
>

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================