Search in sources :

Example 81 with StaticObject

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

the class ReferenceArrayLoadQuickNode method execute.

@Override
public int execute(VirtualFrame frame) {
    int index = BytecodeNode.popInt(frame, top - 1);
    StaticObject array = nullCheck(BytecodeNode.popObject(frame, top - 2));
    StaticObject result = objectArrayLoad.execute(array, index);
    getBytecodeNode().checkNoForeignObjectAssumption(result);
    BytecodeNode.putObject(frame, top - 2, result);
    return stackEffectOf_AALOAD;
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject)

Example 82 with StaticObject

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

the class ShortArrayLoadQuickNode method execute.

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

Example 83 with StaticObject

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

the class CharArrayStoreQuickNode method execute.

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

Example 84 with StaticObject

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

the class MHInvokeBasicNode method call.

@Override
public Object call(Object[] args) {
    StaticObject mh = (StaticObject) args[0];
    StaticObject lform = form.getObject(mh);
    StaticObject mname = vmentry.getObject(lform);
    Method target = (Method) hiddenVmtarget.getHiddenObject(mname);
    return executeCall(args, target);
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) Method(com.oracle.truffle.espresso.impl.Method)

Example 85 with StaticObject

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

the class MHLinkToNode method call.

@Override
public Object call(Object[] args) {
    assert (getMethod().isStatic());
    Method.MethodVersion resolutionSeed = getTarget(args);
    Object[] basicArgs = unbasic(args, resolutionSeed.getMethod().getParsedSignature(), 0, argCount - 1, hasReceiver);
    // method might have been redefined or removed by redefinition
    if (!resolutionSeed.getRedefineAssumption().isValid()) {
        if (resolutionSeed.getMethod().isRemovedByRedefition()) {
            Klass receiverKlass = hasReceiver ? ((StaticObject) basicArgs[0]).getKlass() : resolutionSeed.getMethod().getDeclaringKlass();
            resolutionSeed = resolutionSeed.getMethod().getContext().getClassRedefinition().handleRemovedMethod(resolutionSeed.getMethod(), receiverKlass).getMethodVersion();
        }
    }
    Method target = linker.linkTo(resolutionSeed.getMethod(), args);
    Object result = executeCall(basicArgs, target.getMethodVersion());
    return rebasic(result, target.getReturnKind());
}
Also used : Klass(com.oracle.truffle.espresso.impl.Klass) StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) Method(com.oracle.truffle.espresso.impl.Method)

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