Don't inline all const
This commit is contained in:
parent
76fb488f8e
commit
641b76133d
1 changed files with 17 additions and 14 deletions
|
@ -21,24 +21,27 @@ open Obc
|
|||
open Obc_mapfold
|
||||
|
||||
let extvaluedesc funs acc evd = match evd with
|
||||
| Wconst se ->
|
||||
Wconst (simplify QualEnv.empty se), acc
|
||||
| Warray (ev,e) ->
|
||||
let ev, acc = extvalue_it funs acc ev in
|
||||
(match ev.w_desc with
|
||||
| Wconst { se_desc = Sarray_power (sv, [_]) } ->
|
||||
Wconst sv, acc
|
||||
| Wconst ({ se_desc = Sarray_power (sv, _::idx) } as arr) ->
|
||||
Wconst {arr with se_desc = Sarray_power (sv, idx)}, acc
|
||||
| Wconst { se_desc = Sarray sv_l } ->
|
||||
(match e.e_desc with
|
||||
| Eextvalue { w_desc = Wconst i } ->
|
||||
| Wconst se ->
|
||||
let se = simplify QualEnv.empty se in
|
||||
(match se.se_desc with
|
||||
| Sarray_power (sv, [_]) ->
|
||||
Wconst sv, acc
|
||||
| Sarray_power (sv, _::idx) ->
|
||||
Wconst { se with se_desc = Sarray_power (sv, idx)}, acc
|
||||
| Sarray sv_l ->
|
||||
(match e.e_desc with
|
||||
| Eextvalue { w_desc = Wconst i } ->
|
||||
(try
|
||||
let indice = int_of_static_exp QualEnv.empty i in
|
||||
Wconst (Misc.nth_of_list (indice+1) sv_l), acc
|
||||
with _ -> raise Errors.Fallback)
|
||||
| _ -> raise Errors.Fallback
|
||||
)
|
||||
let indice = int_of_static_exp QualEnv.empty i in
|
||||
Wconst (Misc.nth_of_list (indice+1) sv_l), acc
|
||||
with _ -> raise Errors.Fallback)
|
||||
| _ -> raise Errors.Fallback
|
||||
)
|
||||
| _ -> raise Errors.Fallback
|
||||
)
|
||||
| _ -> raise Errors.Fallback
|
||||
)
|
||||
| _ -> raise Errors.Fallback
|
||||
|
|
Loading…
Reference in a new issue