use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class AllocUserOp method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
ObjectReference object;
try {
object = env.alloc(refCount, dataCount, getDoubleAlign(frame), site);
} catch (OutOfMemory e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Error allocating object id:" + ObjectModel.lastObjectId() + " refs:" + refCount + " ints: " + dataCount + " align:" + getDoubleAlign(frame) + " site:" + site, e);
}
setResult(frame, new ObjectValue(object));
if (Harness.gcEveryAlloc()) {
env.gc();
}
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class StoreFieldOp method exec.
@Override
public void exec(Env env) {
Clock.assertStarted();
StackFrame frame = env.top();
int fieldIndex = getIndex(frame);
ObjectReference object = getObjectObj(frame);
if (fieldType == Type.INT) {
env.storeDataField(object, fieldIndex, getValInt(frame));
} else if (fieldType == Type.OBJECT) {
env.storeReferenceField(object, fieldIndex, getValObject(frame));
}
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class StoreFixedFieldOp method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
ObjectReference object = getObjectObj(frame);
if (fieldType == Type.INT) {
env.storeDataField(object, index, getValInt(frame));
} else if (fieldType == Type.OBJECT) {
env.storeReferenceField(object, index, getValObject(frame));
}
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class StoreLocal method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
setResult(frame, frame.get(operand));
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class UnaryOperation method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
setResult(frame, op.operate(frame.get(operand)));
}
Aggregations