src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeStore.java
Print this page
*** 187,197 ****
* Generate a string representing the function with {@code functionId} and {@code paramTypes}.
* @param functionId function id
* @param paramTypes parameter types
* @return a string representing the function
*/
! public static String getCacheKey(final int functionId, final Type[] paramTypes) {
final StringBuilder b = new StringBuilder().append(functionId);
if(paramTypes != null && paramTypes.length > 0) {
b.append('-');
for(final Type t: paramTypes) {
b.append(Type.getShortSignatureDescriptor(t));
--- 187,197 ----
* Generate a string representing the function with {@code functionId} and {@code paramTypes}.
* @param functionId function id
* @param paramTypes parameter types
* @return a string representing the function
*/
! public static String getCacheKey(final Object functionId, final Type[] paramTypes) {
final StringBuilder b = new StringBuilder().append(functionId);
if(paramTypes != null && paramTypes.length > 0) {
b.append('-');
for(final Type t: paramTypes) {
b.append(Type.getShortSignatureDescriptor(t));
*** 273,283 ****
}
}
@Override
public StoredScript load(final Source source, final String functionKey) {
! if (source.getLength() < minSize) {
return null;
}
final File file = getCacheFile(source, functionKey);
--- 273,283 ----
}
}
@Override
public StoredScript load(final Source source, final String functionKey) {
! if (belowThreshold(source)) {
return null;
}
final File file = getCacheFile(source, functionKey);