@Override public BasicValue binaryOperation(final AbstractInsnNode insn, final BasicValue value1, final BasicValue value2) throws AnalyzerException { return createNode(insn, super.binaryOperation(insn, null, null), value1, value2); }
@Override public BasicValue binaryOperation(AbstractInsnNode insn, BasicValue value1, BasicValue value2) throws AnalyzerException { return createNode(insn, super.binaryOperation(insn, null, null), value1, value2); }
/** {@inheritDoc} */ @Override public BasicValue binaryOperation(AbstractInsnNode insn, BasicValue value1, BasicValue value2) throws AnalyzerException { switch (insn.getOpcode()) { case IALOAD: case BALOAD: case CALOAD: case SALOAD: if (value1 == BOOLEAN_ARRAY) return BOOLEAN_VALUE; } return super.binaryOperation(insn, value1, value2); }
@Override public BasicValue binaryOperation(AbstractInsnNode insn, BasicValue value1, BasicValue value2) throws AnalyzerException { if(insn.getOpcode() == Opcodes.AALOAD) { Type t1 = value1.getType(); if(t1 == null || t1.getSort() != Type.ARRAY) { throw new AnalyzerException(insn, "AALOAD needs an array as first parameter"); } Type resultType = Type.getType(t1.getDescriptor().substring(1)); return new BasicValue(resultType); } return super.binaryOperation(insn, value1, value2); }
@Override public BasicValue binaryOperation(final AbstractInsnNode insn, final BasicValue value1, final BasicValue value2) throws AnalyzerException { /* * We're looking for the assignment of a local holder objectref to a member variable. * If we spot that, then the local holder can't be replaced, since we don't (yet) * have the mechanics to replace the member variable with the holder's members or * to assign all of them when this happens. */ if (insn.getOpcode() == Opcodes.PUTFIELD) { if (value2.isReference() && (value1 instanceof ReplacingBasicValue)) { final ReplacingBasicValue possibleThis = (ReplacingBasicValue) value1; if (possibleThis.isThis() && (value2 instanceof ReplacingBasicValue)) { // if this is a reference for a holder class, we can't replace it if (HOLDERS.get(value2.getType().getDescriptor()) != null) { final ReplacingBasicValue localRef = (ReplacingBasicValue) value2; localRef.setAssignedToMember(); } } } } return super.binaryOperation(insn, value1, value2); }
return getElementValue(value1); } else { return super.binaryOperation(insn, value1, value2);