Search in sources :

Example 1 with BytecodeNode

use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.

the class QuickenedGetFieldNode method execute.

@Override
public int execute(VirtualFrame frame) {
    BytecodeNode root = getBytecodeNode();
    StaticObject receiver = nullCheck(BytecodeNode.popObject(frame, top - 1));
    // -receiver
    return getFieldNode.getField(frame, root, receiver, top - 1, statementIndex) - 1;
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode)

Example 2 with BytecodeNode

use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.

the class InlinedSetterNode method execute.

@Override
public int execute(VirtualFrame frame) {
    BytecodeNode root = getBytecodeNode();
    StaticObject receiver = field.isStatic() ? field.getDeclaringKlass().tryInitializeAndGetStatics() : nullCheck(BytecodeNode.popObject(frame, top - 1 - slotCount));
    setFieldNode.setField(frame, root, receiver, top, statementIndex);
    return -slotCount + stackEffect;
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode)

Example 3 with BytecodeNode

use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.

the class QuickenedPutFieldNode method execute.

@Override
public int execute(VirtualFrame frame) {
    BytecodeNode root = getBytecodeNode();
    StaticObject receiver = nullCheck(BytecodeNode.popObject(frame, top - 1 - slotCount));
    setFieldNode.setField(frame, root, receiver, top, statementIndex);
    // -receiver
    return -slotCount - 1;
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode)

Example 4 with BytecodeNode

use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.

the class InlinedGetterNode method execute.

@Override
public int execute(VirtualFrame frame) {
    BytecodeNode root = getBytecodeNode();
    StaticObject receiver = field.isStatic() ? field.getDeclaringKlass().tryInitializeAndGetStatics() : nullCheck(BytecodeNode.popObject(frame, top - 1));
    return (getResultAt() - top) + getFieldNode.getField(frame, root, receiver, getResultAt(), statementIndex);
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) BytecodeNode(com.oracle.truffle.espresso.nodes.BytecodeNode)

Example 5 with BytecodeNode

use of com.oracle.truffle.espresso.nodes.BytecodeNode in project graal by oracle.

the class LeafAssumptionGetterNode 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));
        int resultAt = inlinedMethod.isStatic() ? top : (top - 1);
        return (resultAt - top) + getFieldNode.getField(frame, root, receiver, resultAt, statementIndex);
    } 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)

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