src/share/classes/java/lang/invoke/BoundMethodHandle.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/classes/java/lang/invoke/BoundMethodHandle.java Thu Feb 20 01:37:13 2014
--- new/src/share/classes/java/lang/invoke/BoundMethodHandle.java Thu Feb 20 01:37:12 2014
*** 859,864 ****
--- 859,875 ----
/**
* All subclasses must provide such a value describing their type signature.
*/
static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY;
+
+ private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[4];
+ private static SpeciesData checkCache(int index, String types) {
+ SpeciesData data = SPECIES_DATA_CACHE[index];
+ if (data != null) return data;
+ SPECIES_DATA_CACHE[index] = data = getSpeciesData(types);
+ return data;
+ }
+ static SpeciesData speciesData_L() { return checkCache(1, "L"); }
+ static SpeciesData speciesData_LL() { return checkCache(2, "LL"); }
+ static SpeciesData speciesData_LLL() { return checkCache(3, "LLL"); }
}
src/share/classes/java/lang/invoke/BoundMethodHandle.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File