[VM][Linux][Experimental] betterModuleHandling: 'unload module primitive'

Stephan Rudlof sr at evolgo.de
Tue Feb 15 00:40:56 UTC 2000


Dear VM-Hackers,

to make you more hungry:

Another very interesting new feature: Reloading modules without
restarting Squeak!
Reloading is necessary after recompiling a module and should work both
with Plugins and FFI's...

Attached changeset
	VM_reloadModules.2.cs.gz
does this work.

Currently it works only under Linux now, because 'sqUnixExternalPrims.c'
has been extended a little; but it shouldn't be too difficult to port
(merely cut/paste, I think).

I don't know much about possibly platform dependencies regarding dynamic
libraries, so feedback is very appreciated!


Note: There is a caching mechanism of *modules* in
'sqUnixExternalPrims.c' and another one of *function pointers* in
Interpreter>>primitiveExternalCall. This has to be kept in mind to
understand the stuff...


Stephan

P.S.: I have (Squeak-) compressed the attached files to reduce the size
of this mail.

"Change Set:		VM_reloadModules
Date:			15 February 2000
Author:			Stephan Rudlof

This changeset together with the new 'sqUnixExternalPrims.c' improves
the VM:
-> modules can be unloaded to have a fast compile->test cycle.

Attention:
To use this improvements with other platforms as Linux you have to adapt
'sqUnixExternalPrims.c' to your platform. This shouldn't be too
difficult though.

Preconditions:
- changeset VM_cachingMissingModules;
- changed 'sqUnixExternalPrims.c': functions 'extern
ioUnloadModuleOfLength()' and 'static unloadModuleEntryNamed()' are new
there.

ToDo:
	- FileIn this change set and follow the instructions.
	

Semantics:

-  for installing a new plugin module Squeak has not to be restarted,
just evaluate
	Smalltalk setNewSessionID
;
- it's possible to reinstall loaded modules manually during the current
run by evaluating
	Smalltalk unloadModule: 'LargeIntegers'
(choose an arbitrary module name) and to call a function from this
module then.
"

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VM_reloadModules.2.cs.gz
Type: application/octet-stream
Size: 7785 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000215/21e0b5d1/VM_reloadModules.2.cs.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqUnixExternalPrims.c.gz
Type: application/octet-stream
Size: 3837 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000215/21e0b5d1/sqUnixExternalPrims.c.obj


More information about the Squeak-dev mailing list