Commit 56b96519 authored by Pietro Abate's avatar Pietro Abate

[r2005-06-09 08:58:56 by afrisch] Empty log message

Original author: afrisch
Date: 2005-06-09 08:58:56+00:00
parent 7a46ec72
......@@ -672,8 +672,9 @@ module Normal = struct
print_result_option a
print_result_option b
let print ppf nf =
Format.fprintf ppf "@[NF{na=%a;@[nrecord=@ @[%a@]@]}@]"
Format.fprintf ppf "@[NF{na=%a;@ @[nprod=@ @[%a@]@]};@ @[nrecord=@ @[%a@]@]}@]"
Types.Print.print nf.na
NLineProd.dump nf.nprod
print_record nf.nrecord
......@@ -842,7 +843,7 @@ module Normal = struct
RecNolabel ((if x then Some empty_res else None),
(if y then Some empty_res else None))
| Some l ->
RecLabel (l,aux (Types.Record.split (*_normal*) t l)) in
RecLabel (l,aux (Types.Record.split_normal t l)) in
{ (nempty lab) with
na = t;
nbasic = single_basic empty_res (Types.cap t any_basic);
......@@ -1125,7 +1126,14 @@ struct
| `Switch (yes,no) -> Format.fprintf ppf "Switch(%a,%a)"
print_iface yes print_iface no
| `None -> Format.fprintf ppf "None"
let dump_disp disp =
let ppf = Format.std_formatter in
Format.fprintf ppf "Dispatcher t=%a@." Types.Print.print disp.t;
Array.iter (fun p ->
Format.fprintf ppf " pat %a@." Normal.print p;
) disp.pl
let dispatcher t pl lab : dispatcher =
try DispMap.find (t,pl) !dispatchers
with Not_found ->
......@@ -1190,7 +1198,8 @@ struct
Array.of_list (Array.fold_right aux pl [])
let return disp pl f ar =
let aux = function [x] -> Some (f x) | [] -> None | _ -> assert false in
let aux = function [x] -> Some (f x) | [] -> None
| _ -> dump_disp disp; assert false in
let final = Array.map aux pl in
(find_code disp final, create_result final, ar)
......
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