X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fl2JIT.ml;h=c15d236595c0835a7b05c376bbef2489790f88e4;hb=762af11c30f30845ab7cd72d640ea153ed160487;hp=d01d4806d0cefd9a732cb58a14d5543affddbcee;hpb=0c50360a781f9c1048ac84d90561cdd5a6fb34ac;p=SXSI%2Fxpathcomp.git diff --git a/src/l2JIT.ml b/src/l2JIT.ml index d01d480..c15d236 100644 --- a/src/l2JIT.ml +++ b/src/l2JIT.ml @@ -86,18 +86,19 @@ let jump_stat_summary fmt = type opcode = - | CACHE - | RETURN + | RETURN of unit | LEFT of Translist.t * jump | RIGHT of Translist.t * jump | BOTH of Translist.t * jump * jump + | CACHE of unit type t = opcode Cache.Lvl2.t -let dummy = CACHE +let dummy = CACHE () +let return = RETURN () let print_opcode fmt o = match o with - | CACHE -> fprintf fmt "CACHE" - | RETURN -> fprintf fmt "RETURN" + | CACHE _ -> fprintf fmt "CACHE" + | RETURN _ -> fprintf fmt "RETURN" | LEFT (tl, j) -> fprintf fmt "LEFT(\n[%a], %a)" Translist.print tl print_jump j | RIGHT (tl, j) -> fprintf fmt "RIGHT(\n[%a], %a)" Translist.print tl print_jump j | BOTH (tl, j1, j2) -> fprintf fmt "BOTH(\n[%a], %a, %a)" Translist.print tl print_jump j1 print_jump j2 @@ -212,7 +213,7 @@ let compile cache2 auto tree tag states = let op = let empty_s1 = StateSet.is_empty states1 in let empty_s2 = StateSet.is_empty states2 in - if empty_s1 && empty_s2 then RETURN + if empty_s1 && empty_s2 then return else if empty_s1 then RIGHT (tr_list, compute_jump auto tree tag states2 DIR_RIGHT) @@ -235,7 +236,7 @@ let compile cache2 auto tree tag states = op let get_transitions = function - | CACHE | RETURN -> failwith "get_transitions" + | CACHE _ | RETURN _ -> failwith "get_transitions" | LEFT (tr, _) | RIGHT (tr, _) | BOTH (tr, _, _) -> tr