Commit 663abdb7 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 728d217c
...@@ -475,16 +475,20 @@ let rec compare x y = ...@@ -475,16 +475,20 @@ let rec compare x y =
let rec hash = function let rec hash = function
| Pair (x1,x2) -> | Pair (x1,x2) ->
hash x1 * 17 + hash x2 1 + hash x1 * 257 + hash x2 * 17
| (Xml (x1,x2,x3) | XmlNs (x1,x2,x3,_)) -> | (Xml (x1,x2,x3) | XmlNs (x1,x2,x3,_)) ->
hash x1 * 257 + hash x2 * 17 + hash x3 2 + hash x1 * 65537 + hash x2 * 257 + hash x3 * 17
| Record rx -> LabelMap.hash hash rx | Record rx ->
| Atom x -> Atoms.V.hash x 3 + 17 * LabelMap.hash hash rx
| Integer x -> Intervals.V.hash x | Atom x ->
| Char x -> Chars.V.hash x 4 + 17 * Atoms.V.hash x
| Integer x ->
5 + 17 * Intervals.V.hash x
| Char x ->
6 + 17 * Chars.V.hash x
| Abstraction _ | Abstraction _
| Abstraction2 _ -> 1 | Abstraction2 _ -> 7
| Abstract _ -> 2 | Abstract _ -> 8
| Absent -> assert false | Absent -> assert false
| Concat _ as x -> eval_lazy_concat x; hash x | Concat _ as x -> eval_lazy_concat x; hash x
| String_latin1 (i,j,s,q) -> hash (normalize_string_latin1 i j s q) | 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