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. In particular, global state (really, domain-local 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 -> Tenv.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 make_dls : init:(unit -> 'a) -> 'a IStdlib.IStd.DLS.keycreate a value stored in domain-local storage; init is used to set the value on initialization and when spawning a new domain
val register_dls_with_proc_desc_and_tenv :
init:(Procdesc.t -> Tenv.t -> 'a) ->
'a IStdlib.IStd.DLS.key ->
unitspecial case of a value stored in domain local storage