X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FresJIT.mli;h=6822b0bdc0d54d59cf6d9cdf1bb2254b4c6a737f;hb=refs%2Fheads%2Fl3jit-refactor;hp=9b7faff8c92c97fe28d1a58de76fc43cb0c924d3;hpb=4b52da1a20a4fe031930bb96d2ca46bec06dc529;p=SXSI%2Fxpathcomp.git diff --git a/src/resJIT.mli b/src/resJIT.mli index 9b7faff..6822b0b 100644 --- a/src/resJIT.mli +++ b/src/resJIT.mli @@ -27,24 +27,31 @@ type opcode = type code = Nil | Cons of State.t * opcode * code val compile : (State.t * instr list) list -> code * bool +type 'a update = 'a -> 'a -> 'a -> Tree.t -> Tree.node -> StateSet.t * 'a +type 'a cache = 'a update Cache.Lvl3.t +val dummy_update : 'a update +val create : unit -> 'a cache +val update : + ('a array -> 'a array -> 'a array -> Tree.node -> code -> unit) -> + 'a array cache -> Ata.t -> Translist.t -> StateSet.t -> StateSet.t -> + 'a array -> 'a array -> 'a array -> Tree.t -> Tree.node -> StateSet.t * 'a array + +val count_exec : NodeSet.Count.t array -> NodeSet.Count.t array -> NodeSet.Count.t array -> Tree.node -> code -> unit +val mat_exec : NodeSet.Mat.t array -> NodeSet.Mat.t array -> NodeSet.Mat.t array -> Tree.node -> code -> unit module type S = sig module NS : NodeSet.S type t = NS.t array val exec : t -> t -> t -> Tree.node -> code -> unit + val update : t cache -> Ata.t -> Translist.t -> StateSet.t -> StateSet.t -> + t -> t -> t -> Tree.t -> Tree.node -> StateSet.t * t + val print : Format.formatter -> t -> unit + val var : int -> t -> t + val close : ((int*State.t, NS.t) Hashtbl.t) -> t -> t + val is_open : t -> bool end -module Count : - sig - module NS : NodeSet.S with type t = int - type t = NS.t array - val exec : t -> t -> t -> Tree.node -> code -> unit - end - -module Mat : - sig - module NS : NodeSet.S with type t = Tree.node NodeSet.mat - type t = NS.t array - val exec : t -> t -> t -> Tree.node -> code -> unit - end +module Count : S with type NS.t = int +module Mat : S with type NS.t = Tree.node NodeSet.mat +module Make(U : NodeSet.S) : S with type NS.t = U.t