diff options
| author | Kathy Gray | 2014-12-11 03:59:28 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-12-11 03:59:28 +0000 |
| commit | 5a555aadcebda09a490c5855bc82c88ea8064011 (patch) | |
| tree | abd55f13563699e6ce396c11b599bb5870060e9a /src/pretty_print.ml | |
| parent | ccd92a34e436e890671ca66d2ad19180b89b274d (diff) | |
Many fixes, primarily dealing with undefined
Including:
turn an undefined literal into a vector of undefined values of the correct length
handle sparse vector unspecified default values as undefined literals
allow global lets to call library functions
Diffstat (limited to 'src/pretty_print.ml')
| -rw-r--r-- | src/pretty_print.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml index 4ea9ea63..9d7cf616 100644 --- a/src/pretty_print.ml +++ b/src/pretty_print.ml @@ -417,6 +417,7 @@ and pp_lem_exp ppf (E_aux(e,(l,annot))) = | E_exit exp -> fprintf ppf "@[<0>(E_aux (E_exit %a) (%a, %a))@]" pp_lem_exp exp pp_lem_l l pp_annot annot | E_internal_exp (l, Base((_,t),_,_,_)) -> (match t.t with + | Tapp("register",[TA_typ {t=Tapp("vector",[TA_nexp _;TA_nexp r;_;_])}]) | Tapp("vector",[TA_nexp _;TA_nexp r;_;_]) -> (match r.nexp with | Nconst bi -> fprintf ppf "@[<0>(E_aux (E_lit (L_aux (L_num %a) %a)) (%a, %a))@]" @@ -969,6 +970,7 @@ let doc_exp, doc_let = (* doc_op (doc_id op) (exp l) (exp r) *) | E_internal_exp (l, Base((_,t),_,_,_)) -> (match t.t with + | Tapp("register",[TA_typ {t=Tapp("vector",[TA_nexp _;TA_nexp r;_;_])}]) | Tapp("vector",[TA_nexp _;TA_nexp r;_;_]) -> (match r.nexp with | Nvar v -> utf8string v @@ -980,7 +982,7 @@ let doc_exp, doc_let = | Nconst bi -> utf8string (Big_int.string_of_big_int bi) | Nvar v -> utf8string v | _ -> raise (Reporting_basic.err_unreachable l "Internal exp given implicit without var or const")) - | _ -> raise (Reporting_basic.err_unreachable l "Internal exp given non-vector, non-implicit")) + | _ -> raise (Reporting_basic.err_unreachable l ("Internal exp given non-vector, non-implicit " ^ t_to_string t))) (* XXX missing case AAA internal_cast should never have an overload, if it's been seen it's a bug *) |
