[java] fix noexcept hack

Reviewed By: jeremydubreil

Differential Revision: D5556245

fbshipit-source-id: 053f596
master
Sam Blackshear 7 years ago committed by Facebook Github Bot
parent 76629ee9a4
commit 4b8a5683aa

@ -179,14 +179,7 @@ module Exceptional = struct
include (DefaultNode : module type of DefaultNode with type t := node)
let exceptional_succs _ n =
match Procdesc.Node.get_kind n with
| Procdesc.Node.Stmt_node "call_noexcept"
-> (* Hack: signal from the frontend that this node should be modelled as non-throwing.
Eventually, we'll just avoid translating the exceptional edge in the frontend instead. *)
[]
| _
-> Procdesc.Node.get_exn n
let exceptional_succs _ n = Procdesc.Node.get_exn n
let from_pdesc pdesc =
(* map from a node to its exceptional predecessors *)

@ -757,12 +757,7 @@ let rec instruction (context: JContext.t) pc instr : translation =
Instr (create_node node_kind (instrs @ [deref_instr; instr]))
in
let create_node_kind procname =
let assume_noexcept =
match Typ.Procname.get_method procname with "close" -> true | _ -> false
in
let desc =
if assume_noexcept then "call_noexcept" else "Call " ^ Typ.Procname.to_string procname
in
let desc = "Call " ^ Typ.Procname.to_string procname in
Procdesc.Node.Stmt_node desc
in
try

Loading…
Cancel
Save