[summary] change `int ref` field in record to `mutable`

Summary:
It's a bit more annoying to `incr` but is more uniform with the other
`mutable` field.

Reviewed By: ngorogiannis

Differential Revision: D16359027

fbshipit-source-id: 817cd94a0
master
Jules Villard 5 years ago committed by Facebook Github Bot
parent 4fde351565
commit daf38c6d54

@ -18,8 +18,8 @@ let new_session node =
0
| Some summary ->
Summary.Stats.add_visited summary.stats node_id ;
incr summary.Summary.sessions ;
!(summary.Summary.sessions)
summary.Summary.sessions <- summary.Summary.sessions + 1 ;
summary.Summary.sessions
let kind_to_string = function

@ -66,7 +66,7 @@ include struct
type t =
{ payloads: Payloads.t
; sessions: int ref
; mutable sessions: int
; stats: Stats.t
; status: Status.t
; proc_desc: Procdesc.t
@ -256,7 +256,7 @@ module OnDisk = struct
let reset proc_desc =
let summary =
{ sessions= ref 0
{ sessions= 0
; payloads= Payloads.empty
; stats= Stats.empty
; status= Status.Pending

@ -42,7 +42,7 @@ end
(** summary of a procedure name *)
type t =
{ payloads: Payloads.t
; sessions: int ref (** Session number: how many nodes went through symbolic execution *)
; mutable sessions: int (** Session number: how many nodes went through symbolic execution *)
; stats: Stats.t
; status: Status.t
; proc_desc: Procdesc.t

@ -502,7 +502,10 @@ let forward_tabulate summary exe_env tenv proc_cfg wl =
let curr_node = Worklist.remove wl in
mark_visited summary curr_node ;
(* mark nodes visited in fp and re phases *)
let session = incr summary.Summary.sessions ; !(summary.Summary.sessions) in
let session =
summary.Summary.sessions <- summary.Summary.sessions + 1 ;
summary.Summary.sessions
in
do_before_node session curr_node ;
do_node_and_handle curr_node session
done ;

Loading…
Cancel
Save