Cgen: proper assignments from constant variables.
This commit is contained in:
parent
412fd1f81b
commit
0ce7b4efb0
1 changed files with 3 additions and 0 deletions
|
@ -397,6 +397,9 @@ let generate_function_call var_env obj_env outvl objn args =
|
|||
(** Create the statement dest = c where c = v^n^m... *)
|
||||
let rec create_affect_const var_env dest c =
|
||||
match c.se_desc with
|
||||
| Svar ln ->
|
||||
let se = Static.simplify QualEnv.empty (find_const ln).c_value in
|
||||
create_affect_const var_env dest se
|
||||
| Sarray_power(c, n) ->
|
||||
let x = gen_symbol () in
|
||||
[Cfor(x, 0, int_of_static_exp n,
|
||||
|
|
Loading…
Reference in a new issue