Commit 06848baa authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-12-27 16:03:23 by afrisch] Cleanup

Original author: afrisch
Date: 2004-12-27 16:03:23+00:00
parent 4ee47b55
...@@ -1072,6 +1072,10 @@ struct ...@@ -1072,6 +1072,10 @@ struct
| Normal.SConst c -> Const c | Normal.SConst c -> Const c
| _ -> assert false | _ -> assert false
let return_basic disp selected =
let aux_final res = IdMap.map_to_list conv_source_basic res in
return disp selected aux_final
let assoc v l = let assoc v l =
try IdMap.assoc v l with Not_found -> -1 try IdMap.assoc v l with Not_found -> -1
...@@ -1101,9 +1105,7 @@ struct ...@@ -1101,9 +1105,7 @@ struct
let selected = Array.create (Array.length pl) [] in let selected = Array.create (Array.length pl) [] in
let add (i,res) = selected.(i) <- res :: selected.(i) in let add (i,res) = selected.(i) <- res :: selected.(i) in
List.iter add success; List.iter add success;
accu := (t, return_basic disp selected) :: !accu
let aux_final res = IdMap.map_to_list conv_source_basic res in
accu := (t, return disp selected aux_final) :: !accu
| (ty,i) :: rem -> | (ty,i) :: rem ->
aux (i @ success) (Types.cap t ty) rem; aux (i @ success) (Types.cap t ty) rem;
aux success (Types.diff t ty) rem aux success (Types.diff t ty) rem
...@@ -1196,7 +1198,7 @@ struct ...@@ -1196,7 +1198,7 @@ struct
match disp.label with match disp.label with
| None -> | None ->
let (some,none) = Types.Record.empty_cases t in let (some,none) = Types.Record.empty_cases t in
let some = let some = aux some
if some then if some then
let pl = Array.map (fun p -> match p.Normal.nrecord with let pl = Array.map (fun p -> match p.Normal.nrecord with
| Normal.RecNolabel (Some x,_) -> [x] | Normal.RecNolabel (Some x,_) -> [x]
...@@ -1216,19 +1218,12 @@ struct ...@@ -1216,19 +1218,12 @@ struct
in in
Some (RecNolabel (some,none)) Some (RecNolabel (some,none))
| Some lab -> | Some lab ->
(* Format.fprintf Format.std_formatter "lab=%a Split:@." Label.print (LabelPool.value lab);*)
let t = Types.Record.split t lab in let t = Types.Record.split t lab in
(* List.iter (fun (t1,t2) ->
Format.fprintf Format.std_formatter "t1=%a t2=%a@."
Types.Print.print t1
Types.Print.print t2) t; *)
let pl = Array.map (fun p -> match p.Normal.nrecord with let pl = Array.map (fun p -> match p.Normal.nrecord with
| Normal.RecLabel (_,l) -> | Normal.RecLabel (_,l) ->
Normal.NLineProd.get l Normal.NLineProd.get l
| _ -> assert false) disp.pl in | _ -> assert false) disp.pl in
Some (RecLabel (lab,dispatch_prod0 disp t pl)) Some (RecLabel (lab,dispatch_prod0 disp t pl))
(* soucis avec les ncatchv ?? *)
let actions disp = let actions disp =
match disp.actions with match disp.actions with
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment