VMMaker( Re: [Squeakfoundation]KCP & 3.6)

PhiHo Hoang phiho.hoang at rogers.com
Sat Jun 21 00:32:50 CEST 2003


Tim Rowledge wrote:

> "PhiHo Hoang" <phiho.hoang at rogers.com> wrote:
> 
> >     Now I have Squeak.exe with 'SqueakFFIPrims' builtin.
> >     This is cool.
> Now just what is particularly cool about this? I don't get it. 

    It is cool because:

        1/- It was generated as external plugin and now 'plugins.int'
            and 'plugins.ext' were mucked around to turn it into
            an internal plugin and the build was successfully finished.

        2/- It is even cooler when the FFI demos were tried, 
        an EXTERNAL 'SqueakFFIPrims'  still needed.

> > 
> >     Just for fun, 'FontPlugin', 'Mpeg3Plugin', RePlugin' were moved
> >     to 'plugins.ext' together with 'SqueakFFIPrims' for another build
> >     and got undefined references to
> > 
> >         1/- 'FontPlugin_exports',
> >         2/- 'Mpeg3Plugin_exports'
> >         3/- 'RePlugin_exports'
> > 
> >     These 3 plugins can no longer be built as external ?
> >     'SqueakFFIPrims'  could be slided in and out with ease.
> > 
> >     Did I miss something ?
> Yes. When you generate plugins as internal their list of exports is
> incorporated into the generated vm/sqNamedPrimitives.h file. This is so
> that the plugin code searching function can find the functions. See the
> code in Cross/vm/sqNamedPrims.c for details. If you simply move the
> plugins from plugins.int to plugins.ext you are now making the
> sqNamedPrimitives.h file invalid and you will get that error. All
> plugins can be built as internal or external as long as you use the
> tools as they were designed to be used. As soon as you go beyond that
> you should expect problems.
> 
> As I recall your code is mucking around with the way plugins are handled
> in a very platform specific way so you are well outside the original
> design spec of the tool.
> 
> 

    When did we first talk about this ? 3 years ago ? The changes in MobVM
    to handle external and internal plugins in one same consistent manner would
    be applicable to all platforms with support for shared objects/ dynamically
    loaded module. The changes were minimal and I think it is even documented
    somewhere at http://swiki.smallsqueak.net
 
    I am quite happy that MobVM does not need two different versions of the same
    plugin to use it as internal or external plugin. The code for SqM.exe or any 
    other plugins need NOT be changed when any of the plugins change status from
    internal to external or vice versa. 

    That's simplicity. I wouldn't mind mucking around to remove complexity. 
    Hey. it's even fun  ;-)

    I would love to hear from Mac and Linux people for purely academic reason.
    
       
    Cheers,

    PhiHo.



More information about the Squeakfoundation mailing list