Java 类jdk.nashorn.internal.ir.SplitNode 实例源码

项目:OpenJSharp    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:OpenJSharp    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:OpenJSharp    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:OpenJSharp    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:openjdk-jdk10    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:openjdk-jdk10    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:openjdk-jdk10    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:openjdk-jdk10    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:openjdk9    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:openjdk9    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:openjdk9    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:openjdk9    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:kaziranga    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:kaziranga    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:kaziranga    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:kaziranga    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:lookaside_java-1.8.0-openjdk    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:lookaside_java-1.8.0-openjdk    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:lookaside_java-1.8.0-openjdk    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:lookaside_java-1.8.0-openjdk    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:jdk8u_nashorn    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:jdk8u_nashorn    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:jdk8u_nashorn    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:jdk8u_nashorn    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:infobip-open-jdk-8    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb, printTypes);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:infobip-open-jdk-8    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:infobip-open-jdk-8    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:infobip-open-jdk-8    文件:SplitIntoFunctions.java   
private JumpStatement leaveJumpNode(final JumpStatement jump) {
    if (inSplitNode()) {
        final SplitState splitState = getCurrentSplitState();
        final SplitNode splitNode = splitState.splitNode;
        if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) {
            appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber());
            return jump;
        }
    }
    appendStatement(jump);
    return jump;
}
项目:OLD-OpenJDK8    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:OLD-OpenJDK8    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:OLD-OpenJDK8    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:nashorn-backport    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:nashorn-backport    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:nashorn-backport    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:nashorn    文件:PrintVisitor.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    splitNode.toString(sb);
    sb.append(EOLN);
    indent += TABWIDTH;
    indent();
    return true;
}
项目:nashorn    文件:PrintVisitor.java   
@Override
public Node leaveSplitNode(final SplitNode splitNode) {
    sb.append("</split>");
    sb.append(EOLN);
    indent -= TABWIDTH;
    indent();
    return splitNode;
}
项目:nashorn    文件:Splitter.java   
/**
 * Create a new split node from statements contained in a parent block.
 *
 * @param parent     Parent block.
 * @param statements Statements to include.
 *
 * @return New split node.
 */
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
    final long   token      = parent.getToken();
    final int    finish     = parent.getFinish();
    final String name       = function.uniqueName(SPLIT_PREFIX.symbolName());

    final Block newBlock = new Block(token, finish, statements);

    return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
项目:OpenJSharp    文件:JSONWriter.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    return false;
}
项目:OpenJSharp    文件:SplitIntoFunctions.java   
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
    getCurrentFunctionState().splitDepth++;
    splitStates.push(new SplitState(splitNode));
    return true;
}
项目:OpenJSharp    文件:SplitIntoFunctions.java   
SplitState(final SplitNode splitNode) {
    this.splitNode = splitNode;
}