jdk.nashorn.internal.ir.SetSplitState Java Examples

The following examples show how to use jdk.nashorn.internal.ir.SetSplitState. 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: SplitIntoFunctions.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #2
Source File: SplitIntoFunctions.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #3
Source File: SplitIntoFunctions.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #4
Source File: SplitIntoFunctions.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #5
Source File: SplitIntoFunctions.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #6
Source File: SplitIntoFunctions.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #7
Source File: SplitIntoFunctions.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #8
Source File: SplitIntoFunctions.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #9
Source File: SplitIntoFunctions.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #10
Source File: SplitIntoFunctions.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #11
Source File: SplitIntoFunctions.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #12
Source File: SplitIntoFunctions.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #13
Source File: SplitIntoFunctions.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
    if(inSplitNode()) {
        appendStatement(new SetSplitState(RETURN_STATE, returnNode.getLineNumber()));
        getCurrentSplitState().hasReturn = true;
    }
    appendStatement(returnNode);
    return returnNode;
}
 
Example #14
Source File: SplitIntoFunctions.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void appendSplitReturn(final int splitState, final int lineNumber) {
    appendStatement(new SetSplitState(splitState, lineNumber));
    if (getCurrentFunctionState().fn.isProgram()) {
        // If we're splitting the program, make sure every fragment passes back :return
        appendStatement(createReturnReturn());
    } else {
        appendStatement(SplitReturn.INSTANCE);
    }
}
 
Example #15
Source File: NodeVisitor.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #16
Source File: NodeVisitor.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #17
Source File: NodeVisitor.java    From jdk8u_nashorn with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #18
Source File: NodeVisitor.java    From jdk8u_nashorn with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}
 
Example #19
Source File: NodeVisitor.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}
 
Example #20
Source File: NodeVisitor.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #21
Source File: NodeVisitor.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}
 
Example #22
Source File: NodeVisitor.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #23
Source File: NodeVisitor.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #24
Source File: NodeVisitor.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}
 
Example #25
Source File: NodeVisitor.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}
 
Example #26
Source File: NodeVisitor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for leaving a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state expression
 * @return processed node, which will replace the original one, or the original node
 */
public Node leaveSetSplitState(final SetSplitState setSplitState) {
    return leaveDefault(setSplitState);
}
 
Example #27
Source File: NodeVisitor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}
 
Example #28
Source File: NodeVisitor.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Callback for entering a {@link SetSplitState}.
 *
 * @param  setSplitState the set split state statement
 * @return true if traversal should continue and node children be traversed, false otherwise
 */
public boolean enterSetSplitState(final SetSplitState setSplitState) {
    return enterDefault(setSplitState);
}