use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class BinaryOperation method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
setResult(frame, op.operate(frame.get(op1), frame.get(op2)));
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class CallIntrinsicOp method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
Value[] actuals = getOperandValues(frame);
if (hasResult) {
setResult(frame, method.eval(env, actuals));
} else {
method.exec(env, actuals);
}
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class Env method computeThreadRoots.
@Override
public void computeThreadRoots(TraceLocal trace) {
int localCount = 0;
for (StackFrame frame : stack) {
localCount += frame.computeRoots(trace);
}
Clock.stop();
Trace.trace(Item.ROOTS, "Locals: %d", localCount);
Clock.start();
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class Env method dumpThreadRoots.
/**
* Print the thread roots and add them to a stack for processing.
*/
@Override
public Collection<ObjectReference> dumpThreadRoots(int width) {
int frameId = 0;
List<ObjectReference> roots = new ArrayList<ObjectReference>();
for (StackFrame frame : stack) {
System.err.printf(" Frame %5d [", frameId++);
roots.addAll(frame.dumpRoots(width));
System.err.println(" ]");
}
System.err.println();
return roots;
}
use of org.mmtk.harness.lang.runtime.StackFrame in project JikesRVM by JikesRVM.
the class AllocOp method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
ObjectReference object;
try {
object = env.alloc(getRefCount(frame), getDataCount(frame), getDoubleAlign(frame), site);
} catch (OutOfMemory e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Error allocating object id:" + ObjectModel.lastObjectId() + " refs:" + getRefCount(frame) + " ints: " + getDataCount(frame) + " align:" + getDoubleAlign(frame) + " site:" + site, e);
}
setResult(frame, new ObjectValue(object));
if (Harness.gcEveryAlloc()) {
env.gc();
}
}
Aggregations