[squeak-dev] Re: [Vm-dev] Better VM <-> plugin API

Eliot Miranda eliot.miranda at gmail.com
Wed Nov 26 00:51:18 UTC 2008


Hi Igor,
    one question Andreas raised that I hadn't thought of was how with the
new scheme you deal with multiple interpreters?  With the old
interpreterProxy scheme I guess the interpreterProxy could redirect a
function to the relevant interpreter (although this would require a mutex to
make it thread safe).  How do you do it in Hydra with the new scheme?  Do
you load the plugin multiple times, once per VM, or do you do some
redrecting behind the scenes?

On Sat, Nov 22, 2008 at 11:11 AM, Igor Stasenko <siguctua at gmail.com> wrote:

> 2008/11/22 Eliot Miranda <eliot.miranda at gmail.com>:
> > OK, good :)  So Igor, what are the three functions interpreterProxy still
> > has?
>
> Here the part of sqVirtualMachine.h
>
> typedef struct ObjVirtualMachine {
>        sqInt (*minorVersion)(void);
>        sqInt (*majorVersion)(void);
>
> /* IMPORTANT!!!
> *       The rest of functions can be obtained by plugin by calling a
> getVMFunctionPointerBySelector function.
> *       The need in defining additional functions in this struct is gone
> forever
> */
>        void * (*getVMFunctionPointerBySelector)(char * selector);
>
> } ObjVirtualMachine;
>
> > TIA
> >
> > (P.S.  this can be backward-compatible, right?  We can still provide the
> old
> > nterface for a while to allow external plugins to still load)
>
> Yes, first it calls setInterpreter() with new struct.
> Old plugin checks version and refuses to work.
> Then VM calls setInterpreter() with old InterpreterProxy, to make plugin
> happy.
>
> > On Sat, Nov 22, 2008 at 11:06 AM, Igor Stasenko <siguctua at gmail.com>
> wrote:
> >>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081125/09d4f1dd/attachment.htm


More information about the Squeak-dev mailing list