[FIX] MethodCache correctness for highly polymorphic selectors

Brian Rice water at tunes.org
Tue Jan 3 19:28:13 PST 2006


I have just uploaded new VM sources which fix a bug that was brought  
to light by the latest SDI GUI framework updates.
(See http://lists.tunes.org/archives/slate/2005-December/001884.html )

The core of the problem was that hashing for the method cache table  
was done inconsistently between update and lookup. In particular, all  
of the first three role arguments should have been identity-hashed to  
produce a full hash along with the selector, to fully identify the  
method. Instead, only the first role argument was used, leading to  
cases in highly interactive code with multiple signature overrides  
(such as the "behavior handle: event for: graphic" idiom introduced)  
resulting in incorrect method lookups.

This is now fixed as far as I can measure, with only a slight  
performance drop of 10% which can be addressed relatively easily  
later. The method cache provides a performance boost of up to 5 times  
the absolutely naive setup for average code, so this is a relative win.

All of the relevant updates including that for the UI code is now in  
alpha and the slate-current tarball. Let me know if any such problems  
remain.

--
-Brian
http://tunes.org/~water/brice.vcf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20060103/66a86ab7/PGP.pgp


More information about the Slate mailing list