当前位置: 首页>>代码示例>>Java>>正文


Java CodeInstaller.getContext方法代码示例

本文整理汇总了Java中jdk.nashorn.internal.runtime.CodeInstaller.getContext方法的典型用法代码示例。如果您正苦于以下问题:Java CodeInstaller.getContext方法的具体用法?Java CodeInstaller.getContext怎么用?Java CodeInstaller.getContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jdk.nashorn.internal.runtime.CodeInstaller的用法示例。


在下文中一共展示了CodeInstaller.getContext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: forOnDemandCompilation

import jdk.nashorn.internal.runtime.CodeInstaller; //导入方法依赖的package包/类
/**
 * 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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:30,代码来源:Compiler.java

示例2: forInitialCompilation

import jdk.nashorn.internal.runtime.CodeInstaller; //导入方法依赖的package包/类
/**
 * 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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:Compiler.java


注:本文中的jdk.nashorn.internal.runtime.CodeInstaller.getContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。