use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.
the class LeafAssumptionSetterNode method execute.
@Override
public int execute(VirtualFrame frame) {
BytecodeNode root = getBytecodeNode();
if (inlinedMethod.leafAssumption()) {
StaticObject receiver = field.isStatic() ? field.getDeclaringKlass().tryInitializeAndGetStatics() : nullCheck(BytecodeNode.popObject(frame, top - 1 - slotCount));
setFieldNode.setField(frame, root, receiver, top, statementIndex);
return -slotCount + stackEffect;
} else {
CompilerDirectives.transferToInterpreterAndInvalidate();
return root.reQuickenInvoke(frame, top, curBCI, opcode, statementIndex, inlinedMethod);
}
}
use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.
the class CheckCastQuickNode method execute.
@Override
public int execute(VirtualFrame frame) {
BytecodeNode root = getBytecodeNode();
StaticObject receiver = BytecodeNode.peekObject(frame, top - 1);
if (StaticObject.isNull(receiver) || instanceOf.execute(receiver.getKlass())) {
return stackEffectOf_CHECKCAST;
}
root.enterImplicitExceptionProfile();
BytecodeNode.popObject(frame, top - 1);
Meta meta = typeToCheck.getMeta();
throw meta.throwExceptionWithMessage(meta.java_lang_ClassCastException, getExceptionMessage(root, receiver));
}
use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.
the class Method method forceSplit.
public Method forceSplit() {
Method result = new Method(this, getCodeAttribute());
BytecodeNode bytecodeNode = new BytecodeNode(result.getMethodVersion());
EspressoRootNode root = EspressoRootNode.create(bytecodeNode.getFrameDescriptor(), bytecodeNode);
result.getMethodVersion().callTarget = root.getCallTarget();
return result;
}
Aggregations