/** @see PseudoOp#exec(Env) */ @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(); } }
@Override public void exec(Env env) { StackFrame frame = env.top(); int rval = frame.get(operand).getIntValue(); if (rval == 0) { Main.exitWithSuccess(); } Main.exitWithFailure(rval); }