Commit 558c5423 authored by Mário Pereira's avatar Mário Pereira

Extraction: minor

parent fc1d0588
......@@ -256,11 +256,13 @@ module Translate = struct
when isconstructor info rs && mask = MaskGhost ->
| Econst c -> Debug.dprintf debug_compile "compiling constant@.";
assert (mask = MaskVisible);
let c = match c with Number.ConstInt c -> c | _ -> assert false in
ML.mk_expr (ML.Econst c) (ML.I e.e_ity) mask eff attrs
ML.e_const c (ML.I e.e_ity) mask eff attrs
| Evar pv ->
Debug.dprintf debug_compile "compiling variable %a@." print_pv pv;
ML.mk_expr (ML.Evar pv) (ML.I e.e_ity) mask eff attrs
assert (mask = MaskVisible);
ML.e_var pv (ML.I e.e_ity) mask eff attrs
| Elet (LDvar (_, e1), e2) when e_ghost e1 ->
expr info svar mask e2
| Elet (LDvar (_, e1), e2) when e_ghost e2 ->
......@@ -299,6 +299,12 @@ let mk_its_defn its_name its_args its_private its_def =
let e_unit =
mk_expr enope (I Ity.ity_unit) MaskVisible Ity.eff_empty Sattr.empty
let e_const c =
mk_expr (Econst c)
let e_var pv =
mk_expr (Evar pv)
let var_defn pv e =
Lvar (pv, e)
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