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

Igor Stasenko siguctua at gmail.com
Sat Nov 22 19:11:48 UTC 2008


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.



More information about the Squeak-dev mailing list