@ -28,10 +28,9 @@ let search_expensive_call checked_pnames expensive_callee (pname, _) =
else
else
begin
begin
checked_pnames := Procname . Set . add pname ! checked_pnames ;
checked_pnames := Procname . Set . add pname ! checked_pnames ;
match Specs . get_summary pname with
match Specs . proc_resolve_attributes pname with
| None -> None
| None -> None
| Some summary ->
| Some attributes ->
let attributes = Specs . get_attributes summary in
let annotated_signature = Annotations . get_annotated_signature attributes in
let annotated_signature = Annotations . get_annotated_signature attributes in
let ret_annotation , _ = annotated_signature . Annotations . ret in
let ret_annotation , _ = annotated_signature . Annotations . ret in
if Annotations . ia_calls_expensive ret_annotation then
if Annotations . ia_calls_expensive ret_annotation then
@ -56,9 +55,10 @@ let is_expensive attributes =
let check_method check pname =
let check_method check pname =
match AttributesTable. load _attributes pname with
match Specs. proc_resolve _attributes pname with
| None -> false
| None -> false
| Some attributes -> check_attributes check attributes
| Some attributes ->
check_attributes check attributes
let method_is_performance_critical pname =
let method_is_performance_critical pname =
@ -71,9 +71,7 @@ let method_is_expensive pname =
let update_summary_attributes pname =
let update_summary_attributes pname =
match Specs . get_summary pname with
match Specs . get_summary pname with
| None ->
| None -> ()
let pname_str = Procname . to_string pname in
failwith ( " The summary should have been created before running the checker on " ^ pname_str )
| Some summary ->
| Some summary ->
let attributes = Specs . get_attributes summary in
let attributes = Specs . get_attributes summary in
let ret_annot , param_annot = attributes . ProcAttributes . method_annotation in
let ret_annot , param_annot = attributes . ProcAttributes . method_annotation in