< prev index next >

src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java

Print this page
rev 15686 : 8161211: better inlining support for loop bytecode intrinsics
Reviewed-by: jrose, vlivanov


 852     static final Lookup LOOKUP = Lookup.IMPL_LOOKUP;
 853 
 854     /**
 855      * All subclasses must provide such a value describing their type signature.
 856      */
 857     static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY;
 858 
 859     private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[6];
 860     private static SpeciesData checkCache(int size, String types) {
 861         int idx = size - 1;
 862         SpeciesData data = SPECIES_DATA_CACHE[idx];
 863         if (data != null)  return data;
 864         SPECIES_DATA_CACHE[idx] = data = getSpeciesData(types);
 865         return data;
 866     }
 867     static SpeciesData speciesData_L()      { return checkCache(1, "L"); }
 868     static SpeciesData speciesData_LL()     { return checkCache(2, "LL"); }
 869     static SpeciesData speciesData_LLL()    { return checkCache(3, "LLL"); }
 870     static SpeciesData speciesData_LLLL()   { return checkCache(4, "LLLL"); }
 871     static SpeciesData speciesData_LLLLL()  { return checkCache(5, "LLLLL"); }
 872     static SpeciesData speciesData_LLLLLL() { return checkCache(6, "LLLLLL"); }
 873 }


 852     static final Lookup LOOKUP = Lookup.IMPL_LOOKUP;
 853 
 854     /**
 855      * All subclasses must provide such a value describing their type signature.
 856      */
 857     static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY;
 858 
 859     private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[6];
 860     private static SpeciesData checkCache(int size, String types) {
 861         int idx = size - 1;
 862         SpeciesData data = SPECIES_DATA_CACHE[idx];
 863         if (data != null)  return data;
 864         SPECIES_DATA_CACHE[idx] = data = getSpeciesData(types);
 865         return data;
 866     }
 867     static SpeciesData speciesData_L()      { return checkCache(1, "L"); }
 868     static SpeciesData speciesData_LL()     { return checkCache(2, "LL"); }
 869     static SpeciesData speciesData_LLL()    { return checkCache(3, "LLL"); }
 870     static SpeciesData speciesData_LLLL()   { return checkCache(4, "LLLL"); }
 871     static SpeciesData speciesData_LLLLL()  { return checkCache(5, "LLLLL"); }

 872 }
< prev index next >