[e-lang] TraversalKey bug fixed; Equalizer questions

Kevin Reid kpreid at mac.com
Sat Apr 14 12:37:59 CDT 2007


The bug described at
http://sourceforge.net/tracker/index.php? 
func=detail&aid=1605810&group_id=75274&atid=551529
has been fixed for E-on-Java in revision 352.

I do not have access to mark the bug as fixed in the tracker. (My SF  
username is "kpreid".)

Some questions resulting from this work:

1. Am I correct that Equalizer#samenessHash and  
Equalizer#samenessFringe are exactly the same except that  
samenessHash computes hashes and switches to samenessFringe past the  
hash depth, and that samenessFringe has some early-exit cases?

2. If so, is there a way this code could be made less duplicated?

3. When comparing two references, the current code keeps a stack of  
containing objects which are currently being compared, to allow  
comparing cycles. Would it be incorrect (ignoring efficiency for the  
moment) to remember all such pairs through an entire comparison,  
rather than forgetting them as sub-comparisons finish?

4. It has occurred to me that the equalizer could, having determined  
that two references are the same but not pointer-equal, replace one  
of them with the other, thus saving memory and allowing future  
comparisons to be cheap. Can you think of a good way for the  
equalizer to communicate this to the objects it uncalls?

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list