Commit 6f133b9d authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-04-22 07:18:55 by afrisch] Empty log message

Original author: afrisch
Date: 2005-04-22 07:18:55+00:00
parent 300679a7
......@@ -475,16 +475,20 @@ let rec compare x y =
let rec hash = function
| Pair (x1,x2) ->
hash x1 * 17 + hash x2
1 + hash x1 * 257 + hash x2 * 17
| (Xml (x1,x2,x3) | XmlNs (x1,x2,x3,_)) ->
hash x1 * 257 + hash x2 * 17 + hash x3
| Record rx -> LabelMap.hash hash rx
| Atom x -> Atoms.V.hash x
| Integer x -> Intervals.V.hash x
| Char x -> Chars.V.hash x
2 + hash x1 * 65537 + hash x2 * 257 + hash x3 * 17
| Record rx ->
3 + 17 * LabelMap.hash hash rx
| Atom x ->
4 + 17 * Atoms.V.hash x
| Integer x ->
5 + 17 * Intervals.V.hash x
| Char x ->
6 + 17 * Chars.V.hash x
| Abstraction _
| Abstraction2 _ -> 1
| Abstract _ -> 2
| Abstraction2 _ -> 7
| Abstract _ -> 8
| Absent -> assert false
| Concat _ as x -> eval_lazy_concat x; hash x
| String_latin1 (i,j,s,q) -> hash (normalize_string_latin1 i j s q)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment