Search in sources :

Example 86 with StaticObject

use of com.oracle.truffle.espresso.runtime.StaticObject in project graal by oracle.

the class InstanceOfQuickNode method execute.

@Override
public int execute(VirtualFrame frame) {
    StaticObject receiver = BytecodeNode.popObject(frame, top - 1);
    boolean result = StaticObject.notNull(receiver) && instanceOf.execute(receiver.getKlass());
    BytecodeNode.putInt(frame, top - 1, result ? 1 : 0);
    return stackEffectOf_INSTANCEOF;
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject)

Example 87 with StaticObject

use of com.oracle.truffle.espresso.runtime.StaticObject 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 88 with StaticObject

use of com.oracle.truffle.espresso.runtime.StaticObject in project graal by oracle.

the class InvokeSpecialQuickNode method execute.

@Override
public int execute(VirtualFrame frame) {
    /*
         * Method signature does not change across methods. Can safely use the constant signature
         * from `method` instead of the non-constant signature from the lookup.
         */
    Object[] args = BytecodeNode.popArguments(frame, top, true, method.getMethod().getParsedSignature());
    nullCheck((StaticObject) args[0]);
    Object result = invokeSpecial.execute(args);
    if (!returnsPrimitiveType) {
        getBytecodeNode().checkNoForeignObjectAssumption((StaticObject) result);
    }
    return (getResultAt() - top) + BytecodeNode.putKind(frame, getResultAt(), result, method.getMethod().getReturnKind());
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject)

Example 89 with StaticObject

use of com.oracle.truffle.espresso.runtime.StaticObject in project graal by oracle.

the class FloatArrayLoadQuickNode method execute.

@Override
public int execute(VirtualFrame frame) {
    int index = BytecodeNode.popInt(frame, top - 1);
    StaticObject array = nullCheck(BytecodeNode.popObject(frame, top - 2));
    BytecodeNode.putFloat(frame, top - 2, floatArrayLoad.execute(array, index));
    return stackEffectOf_FALOAD;
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject)

Example 90 with StaticObject

use of com.oracle.truffle.espresso.runtime.StaticObject 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)

Aggregations

StaticObject (com.oracle.truffle.espresso.runtime.StaticObject)199 Method (com.oracle.truffle.espresso.impl.Method)57 JavaType (com.oracle.truffle.espresso.substitutions.JavaType)44 Klass (com.oracle.truffle.espresso.impl.Klass)32 ObjectKlass (com.oracle.truffle.espresso.impl.ObjectKlass)32 TruffleObject (com.oracle.truffle.api.interop.TruffleObject)30 Meta (com.oracle.truffle.espresso.meta.Meta)29 TruffleBoundary (com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)26 ArrayKlass (com.oracle.truffle.espresso.impl.ArrayKlass)23 NoSafepoint (com.oracle.truffle.espresso.jni.NoSafepoint)17 ArrayList (java.util.ArrayList)13 EspressoException (com.oracle.truffle.espresso.runtime.EspressoException)9 Symbol (com.oracle.truffle.espresso.descriptors.Symbol)8 FrameInstance (com.oracle.truffle.api.frame.FrameInstance)7 ExportMessage (com.oracle.truffle.api.library.ExportMessage)7 BytecodeNode (com.oracle.truffle.espresso.nodes.BytecodeNode)7 TruffleSafepoint (com.oracle.truffle.api.TruffleSafepoint)6 Name (com.oracle.truffle.espresso.descriptors.Symbol.Name)6 EspressoContext (com.oracle.truffle.espresso.runtime.EspressoContext)6 Type (com.oracle.truffle.espresso.descriptors.Symbol.Type)5