VM Plugins initialisation/finalisation/callback

Tim Rowledge rowledge at interval.com
Sat Jun 19 05:58:33 UTC 1999


While messing with pluginising theVM, I've noticed that a few things I'd
like to pry out of the main VM involve various routines used for
startup/shutdown or just calling back in some form.

Probably the simplest example if the network stuff; the 'normal'
setInterpreter() is ok, but we need to call aioPollForIO from the main
event polling loop and sqNetworkShutdown as part of exiting theVM.
Obviously if the network plugin is not there, we need to avoid branching to
Poughkeepsie (either by having a suitable null function or checking for a
0 pointer as appropriate) but once the plugin is loaded we need to hookup
properly.

Two part question:-
a) can anyone come up with other similar problems waiting in the wings for
Mac/PC/OS/2 platforms (I'm able to do the work on Acorn and Linux) that
need to be considered?
b) any thoughts on nice ways to setup these functions without doing the
gross hack and adding junk to the VirtualMachine struct?

My immediate needs would be met by adding a VM function that sets two
function pointers for the poll and shutdown, but I don't really find that
tasteful nor flexible. And it's too late at night for met to come up with
anything neater on my own...

tim (yawn, snore)

-- 
Fractured Idiom:- VENI, VIDI, VISA - I came, I saw, I bought
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list