[Vm-dev] playing with threaded ffi as external plugin...

Eliot Miranda eliot.miranda at gmail.com
Thu Mar 24 17:01:41 UTC 2011


Hi Esteban,

On Thu, Mar 24, 2011 at 5:19 AM, Esteban Lorenzano <estebanlm at gmail.com>wrote:

>
> stupid me...
>
> thanks Igor
>
> now it has 22/23 FFI tests in green :P
>

what's the failing test?


>
> cheers,
> Esteban
>
> El 23/03/2011, a las 11:59p.m., Igor Stasenko escribió:
>
> >
> > On 24 March 2011 02:57, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> >>
> >> Hi,
> >> I found that ThreadedIA32FFIPlugin wasn't being loaded at all... so I
> started debugging until I saw some details (btw... xcode4 debugger is even
> worst than before):
> >> I changed this declaration:
> >> #ifdef SQUEAK_BUILTIN_PLUGIN
> >> #undef EXPORT
> >> // was #undef EXPORT(returnType) but screws NorCroft cc
> >> #define EXPORT(returnType) static returnType
> >> #endif
> >> with:
> >> #ifndef SQUEAK_BUILTIN_PLUGIN
> >> ...
> >> #endif
> >>
> >> also I changed:
> >> #ifdef SQUEAK_BUILTIN_PLUGIN
> >> extern
> >> #endif
> >> with:
> >> #ifndef SQUEAK_BUILTIN_PLUGIN
> >> extern
> >> #endif
> >> and then everything start working.
> >
> >> I still does not know how to test the threads or callbacks for FFI, but
> a simple "MacOSShell new system: 'ls'." was working fine :)
> >> but here is my concern: the change I made looks like a heavy change...
> what I did is correct? should I change VMMaker code to generate plugins with
> my change?
> >
> >
> > An external plugins should be built without -DSQUEAK_BUILTIN_PLUGIN.
> > See in
> > CMakePluginGenerator>>generate
> >   ...
> >       internal ifTrue: [
> >               self puts: 'add_definitions(-DSQUEAK_BUILTIN_PLUGIN)'].
> >   ...
> >
> > So, check the generated <root>/build/SqueakFFIPrims/CMakeLists.txt
> >
> > if you build plugin as external, it should not include this flag.
> >
> > And if you build it as internal, then of course it won't work :)
> > There are an associated code which assuming that you building dynamic
> library
> > (see  platforms/Cross/plugins/SqueakFFIPrims/sqFFITestFuncs.c)
> >
> >
> >> cheers,
> >> Esteban
> >>
> >>
> >
> >
> >
> > --
> > Best regards,
> > Igor Stasenko AKA sig.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110324/1106b07d/attachment.htm


More information about the Vm-dev mailing list