Skip to content

Commit

Permalink
[specialization] avoid requesting a summary with empty specialization
Browse files Browse the repository at this point in the history
Summary:
an empty specialization key `{alias: none, dynamic_types: { }}` will
never generate a better summary than the default summary. We make sure we never
request such specialization now. It should save us some computation time (and space).

Reviewed By: hajduakos, jvillard

Differential Revision:
D55244714

Privacy Context Container: L1208441

fbshipit-source-id: cbebad818f8f049e81418a836e1491765d680a26
  • Loading branch information
davidpichardie authored and facebook-github-bot committed Mar 26, 2024
1 parent 0d6297b commit be6d9bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion infer/src/pulse/PulseCallOperations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ let call tenv path ~caller_proc_desc
Specialization.Pulse.pp specialization ;
if nth_iteration >= max_iteration then
L.d_printfln "[specialization] we have reached the maximum number of iteration" ;
if nth_iteration >= max_iteration || has_already_be_given || ask_caller_of_caller_first
if
nth_iteration >= max_iteration || has_already_be_given || ask_caller_of_caller_first
|| Specialization.Pulse.is_empty specialization
then
case_if_specialization_is_impossible
~f:(add_need_dynamic_type_specialization needs_from_caller)
Expand Down

0 comments on commit be6d9bd

Please sign in to comment.