FFI Question on Linux

Henrik Gedenryd Henrik.Gedenryd at lucs.lu.se
Mon Oct 23 10:41:10 UTC 2000


yampa at mindspring.com wrote:

> Kevin, I have tried rebuilding the VM as you described below.  I can
> successfully compile a new VM, but I still get errors running the FFI as
> before.  When I run "Smalltalk listLoadedModules," or "Smalltalk
> listBuiltinModules," the FFI plugin isn't listed.  I can't see anything in the
> image that loads plugins.  I think this area is close to where my problem
> lies.  

Please note that listLoadedModules only lists modules that have been loaded,
and that a module doesn't get loaded until a piece of code in it is called.
Hence, an external FFI plugin won't be loaded until an FFI call is attempted
(etc.)

I get to post this quite frequently, and I was similarly confused myself, I
think it means something... but I don't know how to fix this confusion re.
module loading semantics.

Perhaps by appending a notice to the result that notes just this, ie. what
it takes for a module to get loaded? This is unpretty, but merely a better
comment for #listLoadedModules might not be enough?

Perhaps better, another message that serves this testing purpose better,
something like #tryToAccessModule:. I realized that listing all modules that
are available for loading cannot really be done.

Another way would be to write as much as possible of the module loading code
in Smalltalk instead of in C, to make the loading process more transparent.
But could the VM call back into Squeak and activate a regular method for
loading a module? I think the exception code does something similar.

What say you, esp. Tim who wrote this stuff?

Henrik






More information about the Squeak-dev mailing list