Interpreter Plugins

Alejandro F. Reimondo alereimondo at sugarweb.com
Thu Apr 9 21:02:45 UTC 1998


Andreas,
To support my implementation of sqAPIs without Interpreter's code modification I've implemented a minimum framework for VM plugIns.
The addition of sqAPIs and other VM modules can be done without Interpreter's code modification.
And the VM C code is built evaluating an expresion like:
	VirtualMachineSourceBuilder current
		plugAll;
		plug: myPlugIn;
		translate
Using VM plugIns result in more Interpreter-independent implementations of VM addons.
If you want to, I can send the framework's code by mail. Or you can download sqAPI's code from SUGAR's miniatures page at: http://www.sugarWeb.com/Miniatures/DownLoad.html

Ale.

----------
Desde: 	Andreas Raab[SMTP:raab at isgnw.cs.Uni-Magdeburg.DE]
Enviado el: 	Jueves 9 de Abril de 1998 19:14
Para: 	squeak at cs.uiuc.edu
Asunto: 	Interpreter Plugins


Mike wrote:
> I think we need to be very careful about adding too much bulk to the Squeak
> environment.  I want to be able to use it for handheld devices,

It is interesting you mention this. I think this is closely related to
what Tim called a _way_ too complicated and convoluted VM. So here is a
suggestion:

At the moment everything concerning primitives is kept in the interpreter
itself (actually it's in both the Interpreter and the DynamicInterpreter).
However, it is not easily possible to remove this since if you want to
remove say the entire networking stuff, you'll have to do quite some
modifications to the VM. And this, in turn, makes porting and adding
new stuff much harder than it actually *should* be. Why don't we just take
out stuff that is not needed to actually run squeak in some sort of
plugins?! The only thing which would be needed is a well-defined interface
to access, register and unregister from the VM. Than we could put a whole
lot of stuff in separate classes (such as BitBlt) and keep the actual
interpreter small.

Even more, we could build customized VMs for certain application domains
which might not include networking, sound, or even file support (if its
running a bare chip system). Also, adding new stuff would be probably much
easier - you would not have to modify the Interpreter but could just
create a new plugin which can be translated into C code. Finally, a lot of
duplicate work could be removed by the plugins because if each new
Interpreter implementation implements the plugin interface it should run
immediately. BTW, I think that the sqUserPrims.h file already gives a good
impression about what is needed to access the Interpreter from such a
plugin.

Comments?
  Andreas
-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list