Do not inline linear extended values.
This commit is contained in:
parent
30089e7d0f
commit
3269a04052
1 changed files with 3 additions and 1 deletions
|
@ -54,9 +54,11 @@ let gather_extvalues_node nd =
|
|||
| _ -> false
|
||||
in
|
||||
|
||||
let inlinable w = Linearity.is_linear w.w_linearity in
|
||||
|
||||
let gather_extvalues_eq _ env eq =
|
||||
let env = match eq.eq_lhs, eq.eq_rhs.e_desc with
|
||||
| Evarpat x, Eextvalue w when not (changed_type w) -> Env.add x w env
|
||||
| Evarpat x, Eextvalue w when not (changed_type w) && inlinable w -> Env.add x w env
|
||||
| _ -> env
|
||||
in
|
||||
eq, env
|
||||
|
|
Loading…
Reference in a new issue