Java Code Examples for jdk.nashorn.internal.codegen.OptimisticTypesPersistence#load()

The following examples show how to use jdk.nashorn.internal.codegen.OptimisticTypesPersistence#load() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RecompilableScriptFunctionData.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}
 
Example 2
Source File: RecompilableScriptFunctionData.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}
 
Example 3
Source File: RecompilableScriptFunctionData.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}
 
Example 4
Source File: RecompilableScriptFunctionData.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}
 
Example 5
Source File: RecompilableScriptFunctionData.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}
 
Example 6
Source File: RecompilableScriptFunctionData.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}
 
Example 7
Source File: RecompilableScriptFunctionData.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If the function being compiled already has its own invalidated program points map, use it. Otherwise, attempt to
 * load invalidated program points map from the persistent type info cache.
 * @param invalidatedProgramPoints the function's current invalidated program points map. Null if the function
 * doesn't have it.
 * @param typeInformationFile the object describing the location of the persisted type information.
 * @return either the existing map, or a loaded map from the persistent type info cache, or a new empty map if
 * neither an existing map or a persistent cached type info is available.
 */
@SuppressWarnings("unused")
private static Map<Integer, Type> getEffectiveInvalidatedProgramPoints(
        final Map<Integer, Type> invalidatedProgramPoints, final Object typeInformationFile) {
    if(invalidatedProgramPoints != null) {
        return invalidatedProgramPoints;
    }
    final Map<Integer, Type> loadedProgramPoints = OptimisticTypesPersistence.load(typeInformationFile);
    return loadedProgramPoints != null ? loadedProgramPoints : new TreeMap<Integer, Type>();
}