[inferbo] Remove dead check in appending field to location

Summary: In `PowLoc`, we focus on making every constructors of `PowLoc.t` return nomalized value. Thus, it is unnecessary to nomalize any `PowLoc.t` inputs.

Reviewed By: ezgicicek

Differential Revision: D21064893

fbshipit-source-id: d00a7f06b
master
Sungkeun Cho 5 years ago committed by Facebook GitHub Bot
parent 54c4715adc
commit 2152af123d

@ -535,23 +535,23 @@ module PowLoc = struct
let append_field ploc ~fn = let append_field ploc ~fn =
match normalize ploc with match ploc with
| Bottom -> | Bottom ->
(* Return the unknown location to avoid unintended unreachable nodes *) (* Return the unknown location to avoid unintended unreachable nodes *)
Unknown Unknown
| Unknown -> | Unknown ->
ploc Unknown
| Known ploc -> | Known ploc ->
Known (LocSet.fold (fun l -> LocSet.add (Loc.append_field l ~fn)) ploc LocSet.empty) Known (LocSet.fold (fun l -> LocSet.add (Loc.append_field l ~fn)) ploc LocSet.empty)
let append_star_field ploc ~fn = let append_star_field ploc ~fn =
match normalize ploc with match ploc with
| Bottom -> | Bottom ->
(* Return the unknown location to avoid unintended unreachable nodes *) (* Return the unknown location to avoid unintended unreachable nodes *)
Unknown Unknown
| Unknown -> | Unknown ->
ploc Unknown
| Known ploc -> | Known ploc ->
Known (LocSet.fold (fun l -> LocSet.add (Loc.append_star_field l ~fn)) ploc LocSet.empty) Known (LocSet.fold (fun l -> LocSet.add (Loc.append_star_field l ~fn)) ploc LocSet.empty)

Loading…
Cancel
Save