projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restored bottom up run
[SXSI/xpathcomp.git]
/
hcons.ml
diff --git
a/hcons.ml
b/hcons.ml
index
293b90f
..
eb60385
100644
(file)
--- a/
hcons.ml
+++ b/
hcons.ml
@@
-2,7
+2,7
@@
INCLUDE "utils.ml"
module type S =
sig
type data
module type S =
sig
type data
- type t
+ type t
val make : data -> t
val node : t -> data
val hash : t -> int
val make : data -> t
val node : t -> data
val hash : t -> int
@@
-13,7
+13,7
@@
module Make (H : Hashtbl.HashedType) : S with type data = H.t =
struct
type data = H.t
type t = { id : int;
struct
type data = H.t
type t = { id : int;
- key : int;
(* hash *)
+ key : int;
node : data;
}
node : data;
}
@@
-23,12
+23,12
@@
struct
let gen_uid =
let id = ref ~-1 in
fun () -> incr id;!id
let gen_uid =
let id = ref ~-1 in
fun () -> incr id;!id
- let equal
t1 t2 = t1 == t2 || t1.id == t2.id
+ let equal
= (==)
module WH = Weak.Make( struct
type _t = t
type t = _t
let hash = hash
module WH = Weak.Make( struct
type _t = t
type t = _t
let hash = hash
- let equal a b = H.equal a.node b.node
+ let equal a b =
a==b ||
H.equal a.node b.node
end)
let pool = WH.create MED_H_SIZE
let make x =
end)
let pool = WH.create MED_H_SIZE
let make x =