Search in sources :

Example 1 with ArrayLengthQuickNode

use of com.oracle.truffle.espresso.nodes.quick.interop.ArrayLengthQuickNode in project graal by oracle.

the class BytecodeNode method quickenArrayLength.

private int quickenArrayLength(VirtualFrame frame, int top, int curBCI) {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    BaseQuickNode arrayLengthNode;
    synchronized (this) {
        if (bs.currentVolatileBC(curBCI) == SLIM_QUICK) {
            arrayLengthNode = sparseNodes[curBCI];
        } else {
            arrayLengthNode = injectQuick(curBCI, new ArrayLengthQuickNode(top, curBCI), SLIM_QUICK);
        }
    }
    return arrayLengthNode.execute(frame) - Bytecodes.stackEffectOf(ARRAYLENGTH);
}
Also used : ArrayLengthQuickNode(com.oracle.truffle.espresso.nodes.quick.interop.ArrayLengthQuickNode) BaseQuickNode(com.oracle.truffle.espresso.nodes.quick.BaseQuickNode)

Aggregations

BaseQuickNode (com.oracle.truffle.espresso.nodes.quick.BaseQuickNode)1 ArrayLengthQuickNode (com.oracle.truffle.espresso.nodes.quick.interop.ArrayLengthQuickNode)1