IR.AnalysisGlobalStateWhile global state should be kept under control at possible (so try to introduce as little of it as possible!), it is sometimes too convenient to ignore. This module lets us do it safely, at least until infer becomes multicore. In particular, global state is appropriately and safely stashed away and restored when the analysis of a procedure is suspended to go analyze another procedure with ondemand (see the Backend.Ondemand module).
val save : unit -> tval restore : t -> unitval initialize : Procdesc.t -> unitRegister pieces of global state from other analysis modules:
save and restore are called when suspending/resuming the analysis of the procedure when we need to go analyze a dependencyinit is called when the analysis of a procedure startsval register_ref : init:(unit -> 'a) -> 'a IStdlib.IStd.ref -> unitspecial case of a value stored in a reference; init sets the ref to init ()
val register_ref_with_proc_desc :
init:(Procdesc.t -> 'a) ->
'a IStdlib.IStd.ref ->
unitsame as register_ref but init takes a proc desc