@Override public void sawOpcode(int seen) { stack.precomputation(this); if (DEBUG1) { System.out.printf("%4d %-15s %s%n", getPC(), Const.getOpcodeName(seen), stack); } try { stack.sawOpcode(this, seen); } catch (RuntimeException e) { throw e; } } }
precomputation(dbc); needToMerge = true; try { getStackItem(0).setSpecialKind(Item.NEWLY_ALLOCATED); break;
@Override public void sawOpcode(int seen) { stack.precomputation(this); stack.sawOpcode(this, seen); pw.println(String.format("After executing: %-16s at PC: %-5d Stack Size: %-3d", Constants.OPCODE_NAMES[getOpcode()], Integer.valueOf(getPC()), Integer.valueOf(stack.getStackDepth()))); } }
/** * overrides the visitor to look conflated use of resources and files */ @Override public void sawOpcode(int seen) { boolean sawResource = false; try { stack.precomputation(this); if (seen == INVOKEVIRTUAL) { sawResource = processInvokeVirtual(); } else if (seen == INVOKESPECIAL) { sawResource = processInvokeSpecial(); } } finally { stack.sawOpcode(this, seen); if (sawResource && (stack.getStackDepth() > 0)) { OpcodeStack.Item item = stack.getStackItem(0); item.setUserValue(Boolean.TRUE); } } }
private void lookForCustomThreadFactoriesInConstructors(int seen) { try { stack.precomputation(this); if (seen == PUTFIELD) { XField f = getXFieldOperand(); XMethod method = stack.getStackItem(0).getReturnValueOf(); if (method != null) { List<String> argumentTypes = SignatureUtils.getParameterSignatures(method.getSignature()); int reg = stack.getStackItem(0).getRegisterNumber(); if (reg >= 0) { Map<Integer, String> ctorParmInfo = SignatureUtils.getParameterSlotAndSignatures(false, getMethod().getSignature()); stack.sawOpcode(this, seen);
stack.precomputation(this); int depth = stack.getStackDepth(); for (int i = 0; i < depth; i++) { OpcodeStack.Item itm = stack.getStackItem(i); itm.setUserValue(null); if ((userValue != null) && (stack.getStackDepth() > 0)) { OpcodeStack.Item itm = stack.getStackItem(0); itm.setUserValue(userValue);
/** * * handle {@code <clinit>} blocks by looking for putstatic calls referencing synchronized collections * * @param seen * the opcode of the currently parsed instruction */ private void sawCLInitOpcode(int seen) { boolean isSyncCollection = false; try { stack.precomputation(this); isSyncCollection = isSyncCollectionCreation(seen); if (seen == PUTSTATIC) { processCollectionStore(); } } finally { stack.sawOpcode(this, seen); if (isSyncCollection && (stack.getStackDepth() > 0)) { OpcodeStack.Item item = stack.getStackItem(0); item.setUserValue(Boolean.TRUE); } } }
private void lookForCustomThreadFactoriesInConstructors(int seen) { try { stack.precomputation(this); if (seen == Const.PUTFIELD) { XField f = getXFieldOperand(); XMethod method = stack.getStackItem(0).getReturnValueOf(); if (method != null) { List<String> argumentTypes = SignatureUtils.getParameterSignatures(method.getSignature()); int reg = stack.getStackItem(0).getRegisterNumber(); if (reg >= 0) { Map<Integer, String> ctorParmInfo = SignatureUtils.getParameterSlotAndSignatures(false, getMethod().getSignature()); stack.sawOpcode(this, seen);
@Override public void sawOpcode(int seen) { stack.precomputation(this); stack.sawOpcode(this, seen); pw.println(String.format("After executing: %-16s at PC: %-5d Stack Size: %-3d", Const.getOpcodeName(getOpcode()), Integer.valueOf(getPC()), Integer.valueOf(stack.getStackDepth()))); } }
@Override public void sawOpcode(int seen) { stack.precomputation(this); if (DEBUG1) { System.out.printf("%4d %-15s %s%n", getPC(), OPCODE_NAMES[seen], stack); } try { stack.sawOpcode(this, seen); } catch (RuntimeException e) { throw e; } } }
stack.precomputation(this); int depth = stack.getStackDepth(); for (int i = 0; i < depth; i++) { OpcodeStack.Item itm = stack.getStackItem(i); itm.setUserValue(null); if ((userValue != null) && (stack.getStackDepth() > 0)) { OpcodeStack.Item itm = stack.getStackItem(0); itm.setUserValue(userValue);
/** * overrides the visitor to look conflated use of resources and files */ @Override public void sawOpcode(int seen) { boolean sawResource = false; try { stack.precomputation(this); if (seen == Const.INVOKEVIRTUAL) { sawResource = processInvokeVirtual(); } else if (seen == Const.INVOKESPECIAL) { sawResource = processInvokeSpecial(); } } finally { stack.sawOpcode(this, seen); if (sawResource && (stack.getStackDepth() > 0)) { OpcodeStack.Item item = stack.getStackItem(0); item.setUserValue(Boolean.TRUE); } } }
stack.precomputation(this); OpcodeStack.Item nullCheckItem = stack.getStackItem(0); XField fieldWhichWasNullChecked = nullCheckItem.getXField(); if (fieldWhichWasNullChecked != null) { stack.sawOpcode(this, seen);
public void sawOpcode(int seen) { try { stack.precomputation(this); } else if ((seen == Const.IRETURN) && isBooleanMethod && !hasValidFalseReturn && (stack.getStackDepth() > 0)) { processBooleanReturn(); stack.sawOpcode(this, seen);
/** * implements the visitor to find methods that employ tail recursion * * @param seen * the opcode of the currently parsed instruction */ @Override public void sawOpcode(int seen) { try { stack.precomputation(this); if (seen == Const.INVOKEVIRTUAL) { checkForTailRecursion(); } } finally { stack.sawOpcode(this, seen); } }
/** * implements the visitor to find return values where the types of objects returned from the method are related only by object. * * @param seen * the opcode of the currently parsed instruction */ @Override public void sawOpcode(int seen) { try { stack.precomputation(this); if ((seen == ARETURN) && (stack.getStackDepth() > 0)) { OpcodeStack.Item itm = stack.getStackItem(0); if (!itm.isNull()) { returnTypes.put(itm.getJavaClass(), Integer.valueOf(getPC())); } } } catch (ClassNotFoundException cnfe) { bugReporter.reportMissingClass(cnfe); } finally { stack.sawOpcode(this, seen); } }
stack.precomputation(this); OpcodeStack.Item nullCheckItem = stack.getStackItem(0); XField fieldWhichWasNullChecked = nullCheckItem.getXField(); if (fieldWhichWasNullChecked != null) { stack.sawOpcode(this, seen);
public void sawOpcode(int seen) { try { stack.precomputation(this); } else if ((seen == IRETURN) && isBooleanMethod && !hasValidFalseReturn && (stack.getStackDepth() > 0)) { processBooleanReturn(); stack.sawOpcode(this, seen);
/** * implements the visitor to find methods that employ tail recursion * * @param seen * the opcode of the currently parsed instruction */ @Override public void sawOpcode(int seen) { try { stack.precomputation(this); if (seen == INVOKEVIRTUAL) { checkForTailRecursion(); } } finally { stack.sawOpcode(this, seen); } }
/** * * handle {@code <clinit>} blocks by looking for putstatic calls referencing synchronized collections * * @param seen * the opcode of the currently parsed instruction */ private void sawCLInitOpcode(int seen) { boolean isSyncCollection = false; try { stack.precomputation(this); isSyncCollection = isSyncCollectionCreation(seen); if (seen == Const.PUTSTATIC) { processCollectionStore(); } } finally { stack.sawOpcode(this, seen); if (isSyncCollection && (stack.getStackDepth() > 0)) { OpcodeStack.Item item = stack.getStackItem(0); item.setUserValue(Boolean.TRUE); } } }