v8Lexer.cmx: v8Parser.cmx options.cmx
grafite.cmo: types.cmo options.cmo grafite.cmi
grafite.cmx: types.cmx options.cmx grafite.cmi
-engine.cmo: v8Parser.cmi v8Lexer.cmo types.cmo grafite.cmi engine.cmi
-engine.cmx: v8Parser.cmx v8Lexer.cmx types.cmx grafite.cmx engine.cmi
+engine.cmo: v8Parser.cmi v8Lexer.cmo types.cmo options.cmo grafite.cmi \
+ engine.cmi
+engine.cmx: v8Parser.cmx v8Lexer.cmx types.cmx options.cmx grafite.cmx \
+ engine.cmi
top.cmo: options.cmo engine.cmi
top.cmx: options.cmx engine.cmx
(* TODO ottimizzare compare *)
HExtlib.list_uniq (List.sort compare (l1 @ l1))
;;
+let rec eq_todo l1 l2 =
+ match l1,l2 with
+ | (D g1) :: tl1,(D g2) :: tl2 when g1=g2 -> eq_todo tl1 tl2
+ | (S (g1,k1,(c1,lt1),i1)) :: tl1, (S (g2,k2,(c2,lt2),i2)) :: tl2
+ when i1 = i2 && g1 = g2 && k1 = k2 && c1 = c2 ->
+ if Lazy.force lt1 = Lazy.force lt2 then eq_todo tl1 tl2 else false
+ | [],[] -> true
+ | _ -> false
+;;
let eat_head todo id fl orlist =
let rec aux acc = function
| [] -> [], acc
| None -> orlist, acc
| Some (((gno,_,_),_,_,_), todo11) ->
(* TODO confronto tra todo da ottimizzare *)
- if gno = id && todo11 = todo then
+ if gno = id && eq_todo todo11 todo then
aux (list_union fl1 acc) tl
else
aux1 todo11