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;
}
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;
}
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());
}
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;
}
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;
}
Aggregations