Java Code Examples for jdk.nashorn.internal.runtime.CodeInstaller#getContext()

The following examples show how to use jdk.nashorn.internal.runtime.CodeInstaller#getContext() . 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: Compiler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a compiler for an on-demand compilation job.
 *
 * @param installer                code installer
 * @param source                   source to compile
 * @param isStrict                 is this a strict compilation
 * @param compiledFunction         compiled function, if any
 * @param types                    parameter and return value type information, if any is known
 * @param invalidatedProgramPoints invalidated program points for recompilation
 * @param typeInformationFile      descriptor of the location where type information is persisted
 * @param continuationEntryPoints  continuation entry points for restof method
 * @param runtimeScope             runtime scope for recompilation type lookup in {@code TypeEvaluator}
 * @return a new compiler
 */
public static Compiler forOnDemandCompilation(
        final CodeInstaller installer,
        final Source source,
        final boolean isStrict,
        final RecompilableScriptFunctionData compiledFunction,
        final TypeMap types,
        final Map<Integer, Type> invalidatedProgramPoints,
        final Object typeInformationFile,
        final int[] continuationEntryPoints,
        final ScriptObject runtimeScope) {
    final Context context = installer.getContext();
    return new Compiler(context, installer, source, context.getErrorManager(), isStrict, true,
            compiledFunction, types, invalidatedProgramPoints, typeInformationFile,
            continuationEntryPoints, runtimeScope);
}
 
Example 2
Source File: Compiler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a compiler for an on-demand compilation job.
 *
 * @param installer                code installer
 * @param source                   source to compile
 * @param isStrict                 is this a strict compilation
 * @param compiledFunction         compiled function, if any
 * @param types                    parameter and return value type information, if any is known
 * @param invalidatedProgramPoints invalidated program points for recompilation
 * @param typeInformationFile      descriptor of the location where type information is persisted
 * @param continuationEntryPoints  continuation entry points for restof method
 * @param runtimeScope             runtime scope for recompilation type lookup in {@code TypeEvaluator}
 * @return a new compiler
 */
public static Compiler forOnDemandCompilation(
        final CodeInstaller installer,
        final Source source,
        final boolean isStrict,
        final RecompilableScriptFunctionData compiledFunction,
        final TypeMap types,
        final Map<Integer, Type> invalidatedProgramPoints,
        final Object typeInformationFile,
        final int[] continuationEntryPoints,
        final ScriptObject runtimeScope) {
    final Context context = installer.getContext();
    return new Compiler(context, installer, source, context.getErrorManager(), isStrict, true,
            compiledFunction, types, invalidatedProgramPoints, typeInformationFile,
            continuationEntryPoints, runtimeScope);
}
 
Example 3
Source File: Compiler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a compiler for an on-demand compilation job.
 *
 * @param installer                code installer
 * @param source                   source to compile
 * @param isStrict                 is this a strict compilation
 * @param compiledFunction         compiled function, if any
 * @param types                    parameter and return value type information, if any is known
 * @param invalidatedProgramPoints invalidated program points for recompilation
 * @param typeInformationFile      descriptor of the location where type information is persisted
 * @param continuationEntryPoints  continuation entry points for restof method
 * @param runtimeScope             runtime scope for recompilation type lookup in {@code TypeEvaluator}
 * @return a new compiler
 */
public static Compiler forOnDemandCompilation(
        final CodeInstaller installer,
        final Source source,
        final boolean isStrict,
        final RecompilableScriptFunctionData compiledFunction,
        final TypeMap types,
        final Map<Integer, Type> invalidatedProgramPoints,
        final Object typeInformationFile,
        final int[] continuationEntryPoints,
        final ScriptObject runtimeScope) {
    final Context context = installer.getContext();
    return new Compiler(context, installer, source, context.getErrorManager(), isStrict, true,
            compiledFunction, types, invalidatedProgramPoints, typeInformationFile,
            continuationEntryPoints, runtimeScope);
}
 
Example 4
Source File: Compiler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a compiler for an on-demand compilation job.
 *
 * @param installer                code installer
 * @param source                   source to compile
 * @param isStrict                 is this a strict compilation
 * @param compiledFunction         compiled function, if any
 * @param types                    parameter and return value type information, if any is known
 * @param invalidatedProgramPoints invalidated program points for recompilation
 * @param typeInformationFile      descriptor of the location where type information is persisted
 * @param continuationEntryPoints  continuation entry points for restof method
 * @param runtimeScope             runtime scope for recompilation type lookup in {@code TypeEvaluator}
 * @return a new compiler
 */
public static Compiler forOnDemandCompilation(
        final CodeInstaller installer,
        final Source source,
        final boolean isStrict,
        final RecompilableScriptFunctionData compiledFunction,
        final TypeMap types,
        final Map<Integer, Type> invalidatedProgramPoints,
        final Object typeInformationFile,
        final int[] continuationEntryPoints,
        final ScriptObject runtimeScope) {
    final Context context = installer.getContext();
    return new Compiler(context, installer, source, context.getErrorManager(), isStrict, true,
            compiledFunction, types, invalidatedProgramPoints, typeInformationFile,
            continuationEntryPoints, runtimeScope);
}
 
Example 5
Source File: Compiler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a compiler for an on-demand compilation job.
 *
 * @param installer                code installer
 * @param source                   source to compile
 * @param isStrict                 is this a strict compilation
 * @param compiledFunction         compiled function, if any
 * @param types                    parameter and return value type information, if any is known
 * @param invalidatedProgramPoints invalidated program points for recompilation
 * @param typeInformationFile      descriptor of the location where type information is persisted
 * @param continuationEntryPoints  continuation entry points for restof method
 * @param runtimeScope             runtime scope for recompilation type lookup in {@code TypeEvaluator}
 * @return a new compiler
 */
public static Compiler forOnDemandCompilation(
        final CodeInstaller installer,
        final Source source,
        final boolean isStrict,
        final RecompilableScriptFunctionData compiledFunction,
        final TypeMap types,
        final Map<Integer, Type> invalidatedProgramPoints,
        final Object typeInformationFile,
        final int[] continuationEntryPoints,
        final ScriptObject runtimeScope) {
    final Context context = installer.getContext();
    return new Compiler(context, installer, source, context.getErrorManager(), isStrict, true,
            compiledFunction, types, invalidatedProgramPoints, typeInformationFile,
            continuationEntryPoints, runtimeScope);
}
 
Example 6
Source File: Compiler.java    From jdk8u_nashorn with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a compiler for an on-demand compilation job.
 *
 * @param installer                code installer
 * @param source                   source to compile
 * @param isStrict                 is this a strict compilation
 * @param compiledFunction         compiled function, if any
 * @param types                    parameter and return value type information, if any is known
 * @param invalidatedProgramPoints invalidated program points for recompilation
 * @param typeInformationFile      descriptor of the location where type information is persisted
 * @param continuationEntryPoints  continuation entry points for restof method
 * @param runtimeScope             runtime scope for recompilation type lookup in {@code TypeEvaluator}
 * @return a new compiler
 */
public static Compiler forOnDemandCompilation(
        final CodeInstaller installer,
        final Source source,
        final boolean isStrict,
        final RecompilableScriptFunctionData compiledFunction,
        final TypeMap types,
        final Map<Integer, Type> invalidatedProgramPoints,
        final Object typeInformationFile,
        final int[] continuationEntryPoints,
        final ScriptObject runtimeScope) {
    final Context context = installer.getContext();
    return new Compiler(context, installer, source, context.getErrorManager(), isStrict, true,
            compiledFunction, types, invalidatedProgramPoints, typeInformationFile,
            continuationEntryPoints, runtimeScope);
}
 
Example 7
Source File: Compiler.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new compiler instance for initial compilation of a script.
 *
 * @param installer code installer
 * @param source    source to compile
 * @param errors    error manager
 * @param isStrict  is this a strict compilation
 * @return a new compiler
 */
public static Compiler forInitialCompilation(
        final CodeInstaller installer,
        final Source source,
        final ErrorManager errors,
        final boolean isStrict) {
    return new Compiler(installer.getContext(), installer, source, errors, isStrict);
}
 
Example 8
Source File: Compiler.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new compiler instance for initial compilation of a script.
 *
 * @param installer code installer
 * @param source    source to compile
 * @param errors    error manager
 * @param isStrict  is this a strict compilation
 * @return a new compiler
 */
public static Compiler forInitialCompilation(
        final CodeInstaller installer,
        final Source source,
        final ErrorManager errors,
        final boolean isStrict) {
    return new Compiler(installer.getContext(), installer, source, errors, isStrict);
}
 
Example 9
Source File: Compiler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new compiler instance for initial compilation of a script.
 *
 * @param installer code installer
 * @param source    source to compile
 * @param errors    error manager
 * @param isStrict  is this a strict compilation
 * @return a new compiler
 */
public static Compiler forInitialCompilation(
        final CodeInstaller installer,
        final Source source,
        final ErrorManager errors,
        final boolean isStrict) {
    return new Compiler(installer.getContext(), installer, source, errors, isStrict);
}
 
Example 10
Source File: Compiler.java    From openjdk-jdk9 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new compiler instance for initial compilation of a script.
 *
 * @param installer code installer
 * @param source    source to compile
 * @param errors    error manager
 * @param isStrict  is this a strict compilation
 * @return a new compiler
 */
public static Compiler forInitialCompilation(
        final CodeInstaller installer,
        final Source source,
        final ErrorManager errors,
        final boolean isStrict) {
    return new Compiler(installer.getContext(), installer, source, errors, isStrict);
}
 
Example 11
Source File: Compiler.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new compiler instance for initial compilation of a script.
 *
 * @param installer code installer
 * @param source    source to compile
 * @param errors    error manager
 * @param isStrict  is this a strict compilation
 * @return a new compiler
 */
public static Compiler forInitialCompilation(
        final CodeInstaller installer,
        final Source source,
        final ErrorManager errors,
        final boolean isStrict) {
    return new Compiler(installer.getContext(), installer, source, errors, isStrict);
}
 
Example 12
Source File: Compiler.java    From jdk8u_nashorn with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new compiler instance for initial compilation of a script.
 *
 * @param installer code installer
 * @param source    source to compile
 * @param errors    error manager
 * @param isStrict  is this a strict compilation
 * @return a new compiler
 */
public static Compiler forInitialCompilation(
        final CodeInstaller installer,
        final Source source,
        final ErrorManager errors,
        final boolean isStrict) {
    return new Compiler(installer.getContext(), installer, source, errors, isStrict);
}