You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
9 years ago
|
(*
|
||
|
* Copyright (c) 2016 - present Facebook, Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* This source code is licensed under the BSD style license found in the
|
||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||
|
*)
|
||
|
|
||
8 years ago
|
open! IStd
|
||
9 years ago
|
|
||
8 years ago
|
module type Payload = sig
|
||
|
type payload
|
||
9 years ago
|
|
||
8 years ago
|
val update_payload : payload -> Specs.summary -> Specs.summary
|
||
|
|
||
|
val read_payload : Specs.summary -> payload option
|
||
8 years ago
|
|
||
9 years ago
|
end
|
||
|
|
||
|
module type S = sig
|
||
8 years ago
|
type payload
|
||
|
|
||
|
val update_summary : payload -> Specs.summary -> Specs.summary
|
||
9 years ago
|
|
||
8 years ago
|
val read_summary : Procdesc.t -> Typ.Procname.t -> payload option
|
||
8 years ago
|
|
||
9 years ago
|
end
|
||
|
|
||
8 years ago
|
module Make (P : Payload) : S with type payload = P.payload = struct
|
||
9 years ago
|
|
||
8 years ago
|
type payload = P.payload
|
||
|
|
||
|
let update_summary payload summary =
|
||
|
P.update_payload payload summary
|
||
9 years ago
|
|
||
8 years ago
|
let read_summary caller_pdesc callee_pname =
|
||
8 years ago
|
match Ondemand.analyze_proc_name ~propagate_exceptions:false caller_pdesc callee_pname with
|
||
9 years ago
|
| None -> None
|
||
8 years ago
|
| Some summary -> P.read_payload summary
|
||
|
|
||
9 years ago
|
end
|