summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c_backend.ml9
-rw-r--r--src/pretty_print_sail.ml2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/c_backend.ml b/src/c_backend.ml
index d9a964e0..77f1b39f 100644
--- a/src/c_backend.ml
+++ b/src/c_backend.ml
@@ -1524,9 +1524,12 @@ let rec compile_aexp ctx = function
let gs = gensym () in
let unit_gs = gensym () in
let loop_test = (F_unary ("!", F_id gs), CT_bool) in
- cond_setup @ [idecl CT_bool gs; idecl CT_unit unit_gs]
+ [idecl CT_bool gs; idecl CT_unit unit_gs]
@ [ilabel loop_start_label]
- @ [iblock ([cond_call (CL_id gs); ijump loop_test loop_end_label]
+ @ [iblock (cond_setup
+ @ [cond_call (CL_id gs)]
+ @ cond_cleanup
+ @ [ijump loop_test loop_end_label]
@ body_setup
@ [body_call (CL_id unit_gs)]
@ body_cleanup
@@ -1534,7 +1537,7 @@ let rec compile_aexp ctx = function
@ [ilabel loop_end_label],
CT_unit,
(fun clexp -> icopy clexp unit_fragment),
- cond_cleanup
+ []
| AE_cast (aexp, typ) -> compile_aexp ctx aexp
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml
index 7620ca50..1dac7a1c 100644
--- a/src/pretty_print_sail.ml
+++ b/src/pretty_print_sail.ml
@@ -265,7 +265,7 @@ let fixities =
(mk_id "|", (InfixR, 2));
]
in
- ref (fixities' : (prec * int) Bindings.t)
+ ref Bindings.empty (*(fixities' : (prec * int) Bindings.t)*)
let rec doc_exp (E_aux (e_aux, _) as exp) =
match e_aux with