links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Tim Bug and Fix for Browser allCallOn: does not find pluging references
Last updated at 1:10 am UTC on 17 January 2006
Browser>class references is supposed to find all the methods where a class is referenced - but unfortunately it misses all those places where a named primitive call is made. For example ,try finding references to LargeIntegersPlugin - you won't find Integer>bitOr:

The cause of this is the way the plugin class is referenced in those methods; instead of a lookupkey as in the usual methods, we have an array with the plugin's moduleName, which is not always the same as the plugin's class name. This little chunk of code illustrates an approach to solving this problem. It will almost certainly not be a full solution because the KCP will likely have affected how allCallsOn: etc are implemented.

For this code we assume you have the VM code package already installed because an important change is needed in InterpreterPlugin to show the effect of taking note of the plugin's module name. The main code change is to StringHolder>browseClassRefs to defer to the actual class for a list of referring methods. This allows the basic #allCallsOn (which in this code also looks for references to the symbol naming the class, a possibly useful general facility which would point out places where is used) to be subclassed for plugins.

Should function ok in a 3.5-5180 image or a 3.6-5205 image with VM package installed