|
@@ -2457,7 +2457,7 @@ module LocalDce = struct
|
|
|
Meta.has Meta.Used v.v_meta
|
|
|
in
|
|
|
let keep v =
|
|
|
- is_used v || (not (Meta.has Meta.CompilerGenerated v.v_meta) && not ctx.config.local_dce) || is_ref_type v.v_type || v.v_capture
|
|
|
+ is_used v || (not (Meta.has Meta.CompilerGenerated v.v_meta) && not ctx.config.local_dce) || is_ref_type v.v_type || v.v_capture || Meta.has Meta.This v.v_meta
|
|
|
in
|
|
|
let rec use v =
|
|
|
if not (is_used v) then begin
|