Search in sources :

Example 6 with BytecodeNode

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);
    }
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode)

Example 7 with BytecodeNode

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));
}
Also used : Meta(com.oracle.truffle.espresso.meta.Meta) StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode)

Example 8 with BytecodeNode

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;
}
Also used : BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode) EspressoRootNode(com.oracle.truffle.espresso.nodes.EspressoRootNode)

Aggregations

BytecodeNode (com.oracle.truffle.espresso.nodes.BytecodeNode)8 StaticObject (com.oracle.truffle.espresso.runtime.StaticObject)7 Meta (com.oracle.truffle.espresso.meta.Meta)1 EspressoRootNode (com.oracle.truffle.espresso.nodes.EspressoRootNode)1