VM improvement: speeding up failing calls of functions in missing modules

Stephan Rudlof sr at evolgo.de
Mon Jan 31 03:03:28 UTC 2000


"Raab, Andreas" wrote:
> 
> Stephan,
> 
> > I didn't know that module names are always stored as symbols, and in
> > dubio I try to fulfill the specification of the primitive.
> > Is it safe to expect no changes regarding this point?
> 
> Yes. I can't see a reason for having these names not being symbols. Note
> that in the eventual case that there is a String stored in the module name
> the only thing going wrong would be that you'd store the string explicitly
> in the missing module cache (no problem as long as not all modules are
> strings which they really shouldn't).

I see a problem here:

In Interpreter>>isInMissingModules: there I have removed the
string/symbol compare for a merely oop compare: So different in oops,
but equal in bytes strings would fill up the cache fast, if many
different functions from the same module - stored as strings with
different oops - are called.
This could lead to a bug: there is no caching anymore, if some (>
cachesize) different functions each stemming from another module are
called in sequence!

> 
>   Andreas
> 
> PS. From the v8 change set: Now that the missing module cache is actually in
> the special objects we could completely avoid clearing it from the VM level
> - this could be done during startup from the ST side (or whenever we feel a
> flush is appropriate).

But in either case it has to be cleared during startup time.
What do you think of is a good time?
The cache has to be cleared early before _every_ possible module call.


Stephan





More information about the Squeak-dev mailing list