private ResourceValue getInstanceValue(ResourceValueFrame frame, InvokeInstruction inv, ConstantPoolGen cpg) { int numConsumed = inv.consumeStack(cpg); if (numConsumed == Const.UNPREDICTABLE) { throw new IllegalStateException(); } return frame.getValue(frame.getNumSlots() - numConsumed); }
@Override public void initEntryFact(ResourceValueFrame result) { result.setValid(); result.clearStack(); final int numSlots = result.getNumSlots(); for (int i = 0; i < numSlots; ++i) { boolean slotContainsInstance = resourceTracker.isParamInstance(resource, i); result.setValue(i, slotContainsInstance ? ResourceValue.instance() : ResourceValue.notInstance()); } }
private void handleInvoke(InvokeInstruction inv) { ResourceValueFrame frame = getFrame(); int numSlots = frame.getNumSlots(); int numConsumed = getNumWordsConsumed(inv); // See if the resource instance is passed as an argument int instanceArgNum = -1; for (int i = numSlots - numConsumed, argCount = 0; i < numSlots; ++i, ++argCount) { ResourceValue value = frame.getValue(i); if (value.equals(ResourceValue.instance())) { instanceArgNum = argCount; break; } } if (instanceArgNum >= 0 && instanceEscapes(inv, instanceArgNum)) { frame.setStatus(ResourceValueFrame.ESCAPED); } handleNormalInstruction(inv); }
final int updatedNumSlots = frame.getNumSlots();
frame.setStatus(status); if (created) { frame.setValue(frame.getNumSlots() - 1, ResourceValue.instance());
ResourceValue topValue = frameAtIf.getValue(frameAtIf.getNumSlots() - 1);
private ResourceValue getInstanceValue(ResourceValueFrame frame, InvokeInstruction inv, ConstantPoolGen cpg) { int numConsumed = inv.consumeStack(cpg); if (numConsumed == Constants.UNPREDICTABLE) { throw new IllegalStateException(); } return frame.getValue(frame.getNumSlots() - numConsumed); }
private void handleInvoke(InvokeInstruction inv) { ResourceValueFrame frame = getFrame(); int numSlots = frame.getNumSlots(); int numConsumed = getNumWordsConsumed(inv); // See if the resource instance is passed as an argument int instanceArgNum = -1; for (int i = numSlots - numConsumed, argCount = 0; i < numSlots; ++i, ++argCount) { ResourceValue value = frame.getValue(i); if (value.equals(ResourceValue.instance())) { instanceArgNum = argCount; break; } } if (instanceArgNum >= 0 && instanceEscapes(inv, instanceArgNum)) { frame.setStatus(ResourceValueFrame.ESCAPED); } handleNormalInstruction(inv); }
@Override public void initEntryFact(ResourceValueFrame result) { result.setValid(); result.clearStack(); final int numSlots = result.getNumSlots(); for (int i = 0; i < numSlots; ++i) { boolean slotContainsInstance = resourceTracker.isParamInstance(resource, i); result.setValue(i, slotContainsInstance ? ResourceValue.instance() : ResourceValue.notInstance()); } }
final int updatedNumSlots = frame.getNumSlots();
frame.setStatus(status); if (created) { frame.setValue(frame.getNumSlots() - 1, ResourceValue.instance());
ResourceValue topValue = frameAtIf.getValue(frameAtIf.getNumSlots() - 1);