浏览代码

We do not need to compare CallExpression for equality

auz34 11 年之前
父节点
当前提交
b650114c0e
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      Jint/Runtime/CallStack/CallStackElementComparer.cs

+ 2 - 4
Jint/Runtime/CallStack/CallStackElementComparer.cs

@@ -6,14 +6,12 @@
     {
         public bool Equals(CallStackElement x, CallStackElement y)
         {
-            return x.CallExpression == y.CallExpression || x.Function == y.Function;
+            return x.Function == y.Function;
         }
 
         public int GetHashCode(CallStackElement obj)
         {
-            // TO DO have not found good hash function yet
-            // not sure it can be done for OR logic
-            return 0;
+            return obj.Function.GetHashCode();
         }
     }
 }