9d97d4afc24fbdf7c38b34619e071b2314356ac1
[SXSI/xpathcomp.git] / src / l2JIT.mli
1 type jump =
2     NOP of unit
3   | FIRST_CHILD of StateSet.t
4   | NEXT_SIBLING of StateSet.t
5   | FIRST_ELEMENT of StateSet.t
6   | NEXT_ELEMENT of StateSet.t
7   | TAGGED_DESCENDANT of StateSet.t * Tag.t
8   | TAGGED_FOLLOWING of StateSet.t * Tag.t
9   | SELECT_DESCENDANT of StateSet.t * Ptset.Int.t * Tree.tag_list
10   | SELECT_FOLLOWING of StateSet.t * Ptset.Int.t * Tree.tag_list
11   | TAGGED_CHILD of StateSet.t * Tag.t
12   | TAGGED_SIBLING of StateSet.t * Tag.t
13   | SELECT_CHILD of StateSet.t * Ptset.Int.t * Tree.tag_list
14   | SELECT_SIBLING of StateSet.t * Ptset.Int.t * Tree.tag_list
15   | TAGGED_SUBTREE of StateSet.t * Tag.t
16   | ELEMENT_SUBTREE of StateSet.t
17
18 val jump_stat_init : unit -> unit
19 val jump_stat : jump -> unit
20
21 val print_jump : Format.formatter -> jump -> unit
22
23 val jump_stat_summary : Format.formatter -> unit
24
25 type opcode =
26     CACHE
27   | RETURN
28   | LEFT of Translist.t * jump
29   | RIGHT of Translist.t * jump
30   | BOTH of Translist.t * jump * jump
31
32 type t = opcode Cache.Lvl2.t
33
34 val dummy : opcode
35
36 val create : unit -> t
37
38 (*val stats : Format.formatter -> t -> unit *)
39
40 val find : t -> int -> StateSet.Node.t -> opcode
41
42 val add : t -> int -> StateSet.Node.t -> opcode -> unit
43
44 val compile : t -> Ata.t -> Tree.t -> TagSet.elt -> StateSet.t -> opcode
45
46 val get_transitions : opcode -> Translist.t