[starvation] fix type bug occurring in class references

Reviewed By: jeremydubreil

Differential Revision: D13466456

fbshipit-source-id: 0b312d9c3
master
Nikos Gorogiannis 6 years ago committed by Facebook Github Bot
parent 930dd2eb03
commit a3f4bb01f4

@ -509,8 +509,6 @@ let d_list (tl : t list) =
let name typ = match typ.desc with Tstruct name -> Some name | _ -> None let name typ = match typ.desc with Tstruct name -> Some name | _ -> None
let inner_name typ = match typ.desc with Tptr ({desc= Tstruct name}, _) -> Some name | _ -> None
let unsome s = function let unsome s = function
| Some default_typ -> | Some default_typ ->
default_typ default_typ

@ -267,9 +267,6 @@ val d_list : t list -> unit
val name : t -> Name.t option val name : t -> Name.t option
(** The name of a type *) (** The name of a type *)
val inner_name : t -> Name.t option
(** Name of the type of a Tstruct pointed to by a Tptr *)
val strip_ptr : t -> t val strip_ptr : t -> t
(** turn a *T into a T. fails if [t] is not a pointer type *) (** turn a *T into a T. fails if [t] is not a pointer type *)

@ -42,7 +42,13 @@ module Lock = struct
let pp = AccessPath.pp let pp = AccessPath.pp
let owner_class ((_, typ), _) = Typ.inner_name typ let owner_class ((_, {Typ.desc}), _) =
match desc with
| Typ.Tstruct name | Typ.Tptr ({desc= Tstruct name}, _) ->
Some name
| _ ->
None
let pp_human fmt lock = let pp_human fmt lock =
let pp_owner fmt lock = let pp_owner fmt lock =

Loading…
Cancel
Save