[Vm-dev] compiling IA32ABI for cocoa cog

Eliot Miranda eliot.miranda at gmail.com
Wed Apr 13 03:05:47 UTC 2011


Its an OK compromise.  It used to work fine.  The VM keeps those symbols it
doesn't want to export to plugins private (static) and makes public only
those it wants them to see.  So having public symbols visible is fine.  It
isn't as clean with Cog.  There is a broad API used to interconnect the
CoInterpreter and the Cogit, lots of which plugins have no business seeing.
 But then plugins don't access them, and in fact it might be useful if some
could (e.g. NativeBoost).  The problems come when there are conflicts
between VM symbols and those in arbitrary code.  But this is worrying about
an unlikely scenario that we can deal with when it arrives.  Use
-fvisibility=default until you get problems.  If it ain't broke, don't fix
it.

best
Eliot


> >
> > Cheers,
> > Esteban
> >
> >
> > El 12/04/2011, a las 10:34p.m., Eliot Miranda escribi?:
> >
> > >
> > >
> > > On Tue, Apr 12, 2011 at 6:30 PM, Esteban Lorenzano <
> estebanlm at gmail.com> wrote:
> > >
> > > Hi Eliot,
> > > yes... I need it, because cocoa cog vm is compiled with:
> -fvisibility=hidden, and so I need to explicitly export functions/variables
> I want to use outside. I could change the visibility, but I'm not sure if
> this is a good idea.
> > >
> > > If you must, you must.  You can include specific declarations in the
> class-side declareCVarsIn: methods, e.g. StackInterpreter class>>
> declareCVarsIn:.
> > >
> > >
> > > Cheers,
> > > Esteban
> > >
> > > El 12/04/2011, a las 9:17p.m., Eliot Miranda escribi?:
> > >
> > >> Hi Esteban,
> > >>
> > >> On Tue, Apr 12, 2011 at 5:03 PM, Esteban Lorenzano <
> estebanlm at gmail.com> wrote:
> > >>
> > >> Hi,
> > >> I'm trying to compile new IA32ABI plugin, who should work with new
> Threaded FFI.
> > >> As everybody requested, I'm trying to compile this plugin as an
> external plugin, and for that reason I need variable
> > >>
> > >> sqInt inIOProcessEvents;
> > >>
> > >> to be
> > >>
> > >> EXPORT(sqInt) inIOProcessEvents;
> > >>
> > >> ...how can I modify VMMaker to ensure this?
> > >>
> > >> Um, are you sure you need to.  If you have a look at
> http://www.squeakvm.org/svn/squeak/branches/Cog r2378 you'll see that
>  inIOProcessEvents is declared in cointerpmt.c and that IA32ABI.c imports it
> via
> > >>
> > >> src/plugins/IA32ABI/IA32ABI.c:  { extern int inIOProcessEvents;
> address = (sqInt)&inIOProcessEvents; }
> > >>
> > >> Doesn't that work?
> > >>
> > >> best,
> > >> Eliot
> > >>
> > >> I tried touching StackInterpreter>>#mustBeGlobal:, but that generates
> bad code on gcc3x-cointerpmt.c (it creates GIV(inIOProcessEvents) calls and
> that does not work)
> > >>
> > >> so... any idea?
> > >>
> > >> thanks,
> > >> Esteban
> > >>
> > >
> > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110412/b9771520/attachment-0001.htm


More information about the Vm-dev mailing list