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


Java CompilationState类代码示例

本文整理汇总了Java中jdk.nashorn.internal.ir.FunctionNode.CompilationState的典型用法代码示例。如果您正苦于以下问题:Java CompilationState类的具体用法?Java CompilationState怎么用?Java CompilationState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CompilationState类属于jdk.nashorn.internal.ir.FunctionNode包,在下文中一共展示了CompilationState类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    final FunctionNode finalizedFunction;
    if (isUnparsedFunction(functionNode)) {
        finalizedFunction = functionNode;
    } else {
        finalizedFunction =
           markProgramBlock(
           removeUnusedSlots(
           createSyntheticInitializers(
           finalizeParameters(
                   lc.applyTopFlags(functionNode))))
                   .setThisProperties(lc, thisProperties.pop().size()));
    }
    return finalizedFunction.setState(lc, CompilationState.SYMBOLS_ASSIGNED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:AssignSymbols.java

示例2: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    try {
        if(emittedMethods.add(functionNode.getName())) {
            method.end(); // wrap up this method
            unit   = lc.popCompileUnit(functionNode.getCompileUnit());
            method = lc.popMethodEmitter(method);
            LOG.info("=== END ", functionNode.getName());
        }

        final FunctionNode newFunctionNode = functionNode.setState(lc, CompilationState.EMITTED);
        newFunctionObject(newFunctionNode, functionNode);
        return newFunctionNode;
    } catch (final Throwable t) {
        Context.printStackTrace(t);
        final VerifyError e = new VerifyError("Code generation bug in \"" + functionNode.getName() + "\": likely stack misaligned: " + t + " " + functionNode.getSource().getName());
        e.initCause(t);
        throw e;
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:21,代码来源:CodeGenerator.java

示例3: restoreFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
private FunctionNode restoreFunctionNode(final FunctionNode functionNode, final long lastToken) {
    final Block newBody = restoreBlock(lc.getFunctionBody(functionNode));

    return lc.pop(functionNode).
        setBody(lc, newBody).
        setLastToken(lc, lastToken).
        setState(lc, errors.hasErrors() ? CompilationState.PARSE_ERROR : CompilationState.PARSED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Parser.java

示例4: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
/**
 * Try to do the apply to call transformation
 * @return true if successful, false otherwise
 */
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    FunctionNode newFunctionNode = functionNode;
    final String functionName = newFunctionNode.getName();

    if (changed.contains(newFunctionNode.getId())) {
        newFunctionNode = newFunctionNode.clearFlag(lc, FunctionNode.USES_ARGUMENTS).
                setFlag(lc, FunctionNode.HAS_APPLY_TO_CALL_SPECIALIZATION).
                setParameters(lc, explodedArguments.peek());

        if (log.isEnabled()) {
            log.info("Success: ",
                    massageURL(newFunctionNode.getSource().getURL()),
                    '.',
                    functionName,
                    "' id=",
                    newFunctionNode.getId(),
                    " params=",
                    callSiteTypes.peek());
        }
    }

    callSiteTypes.pop();
    explodedArguments.pop();

    return newFunctionNode.setState(lc, CompilationState.BUILTINS_TRANSFORMED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:ApplySpecialization.java

示例5: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    try {
        final boolean markOptimistic;
        if (emittedMethods.add(functionNode.getName())) {
            markOptimistic = generateUnwarrantedOptimismExceptionHandlers(functionNode);
            generateContinuationHandler();
            method.end(); // wrap up this method
            unit   = lc.popCompileUnit(functionNode.getCompileUnit());
            popMethodEmitter();
            log.info("=== END ", functionNode.getName());
        } else {
            markOptimistic = false;
        }

        FunctionNode newFunctionNode = functionNode.setState(lc, CompilationState.BYTECODE_GENERATED);
        if (markOptimistic) {
            newFunctionNode = newFunctionNode.setFlag(lc, FunctionNode.IS_DEOPTIMIZABLE);
        }

        newFunctionObject(newFunctionNode, true);
        return newFunctionNode;
    } catch (final Throwable t) {
        Context.printStackTrace(t);
        final VerifyError e = new VerifyError("Code generation bug in \"" + functionNode.getName() + "\": likely stack misaligned: " + t + " " + functionNode.getSource().getName());
        e.initCause(t);
        throw e;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:CodeGenerator.java

示例6: restoreFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
private FunctionNode restoreFunctionNode(final FunctionNode functionNode, final long lastToken) {
final Block newBody = restoreBlock(lc.getFunctionBody(functionNode));

return lc.pop(functionNode).
    setBody(lc, newBody).
    setLastToken(lc, lastToken).
    setState(lc, errors.hasErrors() ? CompilationState.PARSE_ERROR : CompilationState.PARSED).
    snapshot(lc);
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:10,代码来源:Parser.java

示例7: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode node) {
    return node.setCompileUnit(lc, getExistingReplacement(node)).setState(lc, CompilationState.COMPILE_UNITS_REUSED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:ReplaceCompileUnits.java

示例8: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    return functionNode.setState(lc, CompilationState.CONSTANT_FOLDED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:FoldConstants.java

示例9: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    log.info("END FunctionNode: ", functionNode.getName());
    return functionNode.setState(lc, CompilationState.LOWERED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:Lower.java

示例10: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    neverOptimistic.pop();
    return functionNode.setState(lc, CompilationState.OPTIMISTIC_TYPES_ASSIGNED);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:OptimisticTypesCalculator.java

示例11: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    return functionNode.setState(lc, CompilationState.FINALIZED);
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:5,代码来源:FinalizeTypes.java

示例12: leaveFunctionNode

import jdk.nashorn.internal.ir.FunctionNode.CompilationState; //导入依赖的package包/类
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
    LOG.info("END FunctionNode: ", functionNode.getName());
    return functionNode.setState(lc, CompilationState.LOWERED);
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:6,代码来源:Lower.java


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