[BUG][FIX]Browser allCallsOn: doesn't find plugin references

Tim Rowledge tim at sumeru.stanford.edu
Fri May 16 23:25:52 UTC 2003


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 
<Smalltalk at: #classname> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ClassRefBrowseFix.1.cs
Type: application/text
Size: 2571 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030516/fa66c4ec/ClassRefBrowseFix.1.bin
-------------- next part --------------

tim
-- 
tim at sumeru.stanford.edu


More information about the Squeak-dev mailing list