use of com.oracle.truffle.espresso.nodes.quick.BaseQuickNode 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);
}
use of com.oracle.truffle.espresso.nodes.quick.BaseQuickNode in project graal by oracle.
the class BytecodeNode method quickenPutField.
public int quickenPutField(VirtualFrame frame, int top, int curBCI, int opcode, int statementIndex, Field field) {
CompilerDirectives.transferToInterpreterAndInvalidate();
assert opcode == PUTFIELD;
BaseQuickNode putField = tryPatchQuick(curBCI, () -> new QuickenedPutFieldNode(top, curBCI, field, statementIndex));
return putField.execute(frame) - Bytecodes.stackEffectOf(opcode);
}
use of com.oracle.truffle.espresso.nodes.quick.BaseQuickNode in project graal by oracle.
the class BytecodeNode method reQuickenInvoke.
/**
* Revert speculative quickening e.g. revert inlined fields accessors to a normal invoke.
* INVOKEVIRTUAL -> QUICK (InlinedGetter/SetterNode) -> QUICK (InvokeVirtualNode)
*/
public int reQuickenInvoke(VirtualFrame frame, int top, int curBCI, int opcode, int statementIndex, Method resolutionSeed) {
CompilerDirectives.transferToInterpreterAndInvalidate();
assert Bytecodes.isInvoke(opcode);
BaseQuickNode invoke = null;
synchronized (this) {
assert bs.currentBC(curBCI) == QUICK;
char nodeIndex = readCPI(curBCI);
invoke = dispatchQuickened(top, curBCI, readOriginalCPI(curBCI), opcode, statementIndex, resolutionSeed, false);
nodes[nodeIndex] = nodes[nodeIndex].replace(invoke);
}
// Perform the call outside of the lock.
return invoke.execute(frame);
}
Aggregations