From 6b9d68a267d65c44bc023db2a970a4dc0c4ab643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezgi=20=C3=87i=C3=A7ek?= Date: Mon, 12 Apr 2021 02:20:08 -0700 Subject: [PATCH] [ConfigImpact] Consider list.size as cheap and add tests Summary: Consider list.size as cheap and add a bunch of tests Reviewed By: skcho Differential Revision: D27677605 fbshipit-source-id: 1dfa86b5b --- infer/src/cost/ConfigImpactAnalysis.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infer/src/cost/ConfigImpactAnalysis.ml b/infer/src/cost/ConfigImpactAnalysis.ml index 2b38e9840..4cc780e5a 100644 --- a/infer/src/cost/ConfigImpactAnalysis.ml +++ b/infer/src/cost/ConfigImpactAnalysis.ml @@ -472,7 +472,8 @@ module TransferFunctions = struct let dispatch : (Tenv.t, unit, unit) ProcnameDispatcher.ProcName.dispatcher = let open ProcnameDispatcher.ProcName in make_dispatcher - [ +PatternMatch.Java.implements_math &::.*--> () + [ +PatternMatch.Java.implements_collection &:: "size" <>--> () + ; +PatternMatch.Java.implements_math &::.*--> () ; +PatternMatch.Java.implements_number &::.*--> () ; +PatternMatch.Java.implements_system &::+ is_cheap_system_method &--> () ] in