/** * processes a static call or initializer by checking to see if the call is risky, and returning a OpcodeStack item user value saying so. * * @return the user object to place on the OpcodeStack */ @Nullable private UserObject sawStaticCall() { if (getSigConstantOperand().endsWith(Values.SIG_VOID)) { return null; } return new UserObject(isRiskyMethodCall()); }
if (assoc == null) { if (srcItm.getRegisterNumber() >= 0) { assoc = new UserObject(srcItm.getRegisterNumber());
if (assoc == null) { if (srcItm.getRegisterNumber() >= 0) { assoc = new UserObject(srcItm.getRegisterNumber());
/** * processes a instance method call to see if that call is modifies state or is otherwise'risky', if so mark the variable(s) associated with the caller as * not reportable * * @param pc * the current program counter * * @return a user object to place on the return value's OpcodeStack item */ @Nullable private UserObject sawInstanceCall(int pc) { String signature = getSigConstantOperand(); String name = getNameConstantOperand(); // this is kind of a wart. there should be a more seamless way to check this if ("wasNull".equals(getNameConstantOperand()) && SignatureBuilder.SIG_VOID_TO_BOOLEAN.equals(signature)) { dontReport = true; } if (signature.endsWith(Values.SIG_VOID)) { return null; } MethodInfo mi = Statistics.getStatistics().getMethodStatistics(getClassConstantOperand(), name, signature); UserObject uo = new UserObject(getCallingObject(), mi.getModifiesState() || isRiskyMethodCall()); if (uo.caller != null) { ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); if (sb != null) { sb.removeByAssoc(uo.caller); } } return uo; }
/** * processes a instance method call to see if that call is modifies state or is otherwise'risky', if so mark the variable(s) associated with the caller as * not reportable * * @param pc * the current program counter * * @return a user object to place on the return value's OpcodeStack item */ @Nullable private UserObject sawInstanceCall(int pc) { String signature = getSigConstantOperand(); String name = getNameConstantOperand(); // this is kind of a wart. there should be a more seamless way to check this if ("wasNull".equals(getNameConstantOperand()) && SignatureBuilder.SIG_VOID_TO_BOOLEAN.equals(signature)) { dontReport = true; } if (signature.endsWith(Values.SIG_VOID)) { return null; } MethodInfo mi = Statistics.getStatistics().getMethodStatistics(getClassConstantOperand(), name, signature); UserObject uo = new UserObject(getCallingObject(), mi.getModifiesState() || isRiskyMethodCall()); if (uo.caller != null) { ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); if (sb != null) { sb.removeByAssoc(uo.caller); } } return uo; }
@Nullable private UserObject sawGetField() { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); int reg = itm.getRegisterNumber(); if (reg >= 0) { return new UserObject(reg); } } return null; }
@Nullable private UserObject sawGetField() { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); int reg = itm.getRegisterNumber(); if (reg >= 0) { return new UserObject(reg); } } return null; }
/** * processes a static call or initializer by checking to see if the call is risky, and returning a OpcodeStack item user value saying so. * * @return the user object to place on the OpcodeStack */ @Nullable private UserObject sawStaticCall() { if (getSigConstantOperand().endsWith(Values.SIG_VOID)) { return null; } return new UserObject(isRiskyMethodCall()); }