Accessing the Interpreters variables from a Plugin

Bryce Kampjes bryce at kampjes.demon.co.uk
Sun Nov 16 14:53:39 UTC 2003


Thanks everyone.

Tim Rowledge writes:
 > Bert Freudenberg <bert at isg.cs.uni-magdeburg.de> wrote:
 > 
 > > Bryce Kampjes wrote:
 > > 
 > > > Is there an easy portable way to access the interpreters variables
 > > > from a plugin? 
 > > 
 > > I think the only portable way currently is via InterpreterProxy, and 
 > > what's not exposed there is not accessible.
 > Exactly. InterpreterProxy provides an array of function pointers that
 > are accessible to plugin code. Plenty of examples can be found in the
 > source code base.

The problem is I really need access to internal variables.

For the interpreter using an internal plugin as Andreas suggests
sounds like the best idea. Exupery needs to modify the message
dispatch code anyway to call compiled methods. But for the tests it
would be nice if they could be used for normal interpreter development
as well.

What I'm doing is writing tests for all the interpreters
functionality. I'm using the tests to drive the development of Exupery
but it would be nice if they were generally useful.

The only reason the tests need access to the interpreters internal
state is so they can check for consistency. A single primitive that
did a full sanity check would be enough but scanning 20Mb sounds slow
and also involves checking much more than I currently need. Having a
corrupt image is no fun, especially if it could be crashing because of
the current change.

Bryce



More information about the Squeak-dev mailing list