diff options
| author | Alasdair Armstrong | 2018-12-04 14:53:23 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-12-04 14:53:23 +0000 |
| commit | df3ea2e6da387ead7cba1e27632768e563696502 (patch) | |
| tree | 1643e82c6191e4a252d747daca8e3be269cb8a43 /src/constant_fold.ml | |
| parent | 945c8b10a9498d0606f4226bc18d03ef806184f2 (diff) | |
Remove FES_Fexps constructor
This makes dealing with records and field expressions in Sail much
nicer because the constructors are no longer stacked together like
matryoshka dolls with unnecessary layers. Previously to get the fields
of a record it would be either
E_aux (E_record (FES_aux (FES_Fexps (fexps, _), _)), _)
but now it is simply:
E_aux (E_record fexps, _)
Diffstat (limited to 'src/constant_fold.ml')
| -rw-r--r-- | src/constant_fold.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/constant_fold.ml b/src/constant_fold.ml index 0e34ed5b..b86f4ea5 100644 --- a/src/constant_fold.ml +++ b/src/constant_fold.ml @@ -72,7 +72,7 @@ and exp_of_value = | V_bool false -> mk_lit_exp L_false | V_string str -> mk_lit_exp (L_string str) | V_record ctors -> - mk_exp (E_record (FES_aux (FES_Fexps (List.map fexp_of_ctor (StringMap.bindings ctors), false), no_annot))) + mk_exp (E_record (List.map fexp_of_ctor (StringMap.bindings ctors))) | V_vector vs -> mk_exp (E_vector (List.map exp_of_value vs)) | V_tuple vs -> @@ -110,7 +110,7 @@ let rec is_constant (E_aux (e_aux, _)) = match e_aux with | E_lit _ -> true | E_vector exps -> List.for_all is_constant exps - | E_record (FES_aux (FES_Fexps (fexps, _), _)) -> List.for_all is_constant_fexp fexps + | E_record fexps -> List.for_all is_constant_fexp fexps | E_cast (_, exp) -> is_constant exp | E_tuple exps -> List.for_all is_constant exps | _ -> false |
