[inferbo] Add Typ Models for Map

Summary: Typ models for Map/pseudocollection were missing. Let's add them.

Reviewed By: roro47

Differential Revision: D22841932

fbshipit-source-id: f5ea26863
master
Ezgi Çiçek 4 years ago committed by Facebook GitHub Bot
parent 3d561ca1db
commit 745c6577d8

@ -37,5 +37,7 @@ let dispatch : (Tenv.t, typ_model, unit) ProcnameDispatcher.TypName.dispatcher =
; -"std" &:: "vector" < any_typ &+ any_typ >--> std_vector
; +PatternMatch.Java.implements_collection &::.*--> Java.collection
; +PatternMatch.Java.implements_iterator &::.*--> Java.collection
; +PatternMatch.Java.implements_map &::.*--> Java.collection
; +PatternMatch.Java.implements_pseudo_collection &::.*--> Java.collection
; +PatternMatch.Java.implements_lang "Integer" &::.*--> Java.integer
; +PatternMatch.Java.implements_org_json "JSONArray" &::.*--> Java.collection ]

@ -96,6 +96,10 @@ public class Array {
for (int i = 0; i < list.toArray().length; i++) {}
}
void toArray_map_linear(java.util.Map<String, Integer> map) {
for (int i = 0; i < map.values().toArray().length; i++) {}
}
private static final String[] static_final_field = new String[] {"", ""};
void use_static_final_array_field_constant() {

@ -24,6 +24,7 @@ codetoanalyze/java/performance/Array.java, codetoanalyze.java.performance.Array.
codetoanalyze/java/performance/Array.java, codetoanalyze.java.performance.Array.init_array_constant():void, 2568, OnUIThread:false, []
codetoanalyze/java/performance/Array.java, codetoanalyze.java.performance.Array.sort_array_nlogn(int):void, 5 + size × log(size), OnUIThread:false, [{size},Modeled call to Arrays.sort,{size},Modeled call to Arrays.sort]
codetoanalyze/java/performance/Array.java, codetoanalyze.java.performance.Array.toArray_linear(java.util.ArrayList):void, 6 + 6 ⋅ list.length + 3 ⋅ (list.length + 1), OnUIThread:false, [{list.length + 1},Loop,{list.length},Loop]
codetoanalyze/java/performance/Array.java, codetoanalyze.java.performance.Array.toArray_map_linear(java.util.Map):void, 6 + 6 ⋅ map.length + 6 ⋅ (map.length + 1), OnUIThread:false, [{map.length + 1},Loop,{map.length},Loop]
codetoanalyze/java/performance/Array.java, codetoanalyze.java.performance.Array.use_static_final_array_field_constant():void, 18, OnUIThread:false, []
codetoanalyze/java/performance/ArrayCost.java, ArrayCost.<init>(), 3, OnUIThread:false, []
codetoanalyze/java/performance/ArrayCost.java, ArrayCost.ArrayCost(int[]):void, 8 + 5 ⋅ mag.length, OnUIThread:false, [{mag.length},Loop]

Loading…
Cancel
Save