[VM] Plugins and namespaces

Ross Boylan RossBoylan at stanfordalumni.org
Fri Feb 22 21:30:29 UTC 2002


I am trying to understand the interrelations between the different external 
and internal plugins, with an eye toward an enhanced Win32 build for 
VMMaker.  I am concerned both with the names of files and functions.

Here's my current working model.  Is it correct?
1. The same file or function name may appear in two different plugins.
2. Consquently one should use a separate directory for each plugin.
3. The relevant include files for each plugin include those in its own 
directory and the general VM files only.
4. The build for the core VM should not include headers for any of the 
plugin directories.
5. Plugins access other plugins only through calls to the interpreter 
proxy, so do not need headers from the other plugins.
6. All the above statements apply equally to external or internal plugins.
7. Until recently, the namespace collision issues were theoretical, so it 
was possible to get away with a looser approach.  However, the separations 
outlined above are the desired ones going forward.
8. For internal plugins, function names are prefixed by the module name to 
make them unique (not sure where that happens).  For external plugins, the 
names are left as is; the lookup mechanisms specify the module and function 
name, so there is no problem.

As a somewhat separate issue, can anyone comment on directory trees 
appearing under an individual plugin directory?  It seems in some cases the 
plugins themselves have components.




More information about the Squeak-dev mailing list