Normalization of record consts
Normalization of records as constant to ease the compilation: f({ x = e }) -> v = { x = e }; f(v)
This commit is contained in:
parent
ccc07cc7b9
commit
ccab6f7aad
1 changed files with 2 additions and 2 deletions
|
@ -137,8 +137,8 @@ type kind = ExtValue | Any
|
|||
(** Creates an equation and add it to the context if necessary. *)
|
||||
let add context expected_kind e =
|
||||
let up = match e.e_desc, expected_kind with
|
||||
(* static arrays should be normalized to simplify code generation *)
|
||||
| Econst { se_desc = Sarray _ | Sarray_power _ }, ExtValue -> true
|
||||
(* static arrays and records should be normalized to simplify code generation *)
|
||||
| Econst { se_desc = Sarray _ | Sarray_power _ | Srecord _ }, ExtValue -> true
|
||||
| (Evar _ | Eapp ({ a_op = Efield | Etuple | Ereinit }, _, _) | Ewhen _
|
||||
| Econst _) , ExtValue -> false
|
||||
| _ , ExtValue -> true
|
||||
|
|
Loading…
Reference in a new issue