Summary: This will be more useful later when adding another one. Reviewed By: ezgicicek, jberdine Differential Revision: D18115231 fbshipit-source-id: a0a01901a
@ -82,15 +82,14 @@ let check_valid address memory =
Ok ()
let get_closure_proc_name address memory =
let get_attribute getter address memory =
Graph.find_opt address (snd memory)
let open Option.Monad_infix in
|> Option.bind ~f:(fun attributes -> Attributes.get_closure_proc_name attributes)
Graph.find_opt address (snd memory) >>= getter
let get_constant address memory =
let get_closure_proc_name = get_attribute Attributes.get_closure_proc_name
|> Option.bind ~f:(fun attributes -> Attributes.get_constant attributes)
let get_constant = get_attribute Attributes.get_constant
let std_vector_reserve address memory = add_attribute address Attribute.StdVectorReserve memory