/** * Replaces aconst_null producers of the specified stack entry by * iconst_0. */ private void replaceNullStackEntryProducers(Clazz clazz, Method method, CodeAttribute codeAttribute, int consumerOffset, int stackEntryIndex) { InstructionOffsetValue producerOffsets = partialEvaluator.getStackBefore(consumerOffset).getTopActualProducerValue(stackEntryIndex).instructionOffsetValue(); for (int index = 0; index < producerOffsets.instructionOffsetCount(); index++) { int producerOffset = producerOffsets.instructionOffset(index); // TODO: A method might be pushing the null constant. if (producerOffset >= 0 && codeAttribute.code[producerOffset] == InstructionConstants.OP_ACONST_NULL) { // Replace pushing null by pushing 0. replaceInstruction(clazz, producerOffset, new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), new SimpleInstruction(InstructionConstants.OP_ICONST_0)); } } }
/** * Replaces aconst_null producers of the specified stack entry by * iconst_0. */ private void replaceNullStackEntryProducers(Clazz clazz, Method method, CodeAttribute codeAttribute, int consumerOffset, int stackEntryIndex) { InstructionOffsetValue producerOffsets = partialEvaluator.getStackBefore(consumerOffset).getTopActualProducerValue(stackEntryIndex).instructionOffsetValue(); for (int index = 0; index < producerOffsets.instructionOffsetCount(); index++) { int producerOffset = producerOffsets.instructionOffset(index); // TODO: A method might be pushing the null constant. if (producerOffset >= 0 && codeAttribute.code[producerOffset] == InstructionConstants.OP_ACONST_NULL) { // Replace pushing null by pushing 0. replaceInstruction(clazz, producerOffset, new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), new SimpleInstruction(InstructionConstants.OP_ICONST_0)); } } }
/** * Replaces aconst_null producers of the specified stack entry by * iconst_0. */ private void replaceNullStackEntryProducers(Clazz clazz, Method method, CodeAttribute codeAttribute, int consumerOffset, int stackEntryIndex) { InstructionOffsetValue producerOffsets = partialEvaluator.getStackBefore(consumerOffset).getTopActualProducerValue(stackEntryIndex).instructionOffsetValue(); for (int index = 0; index < producerOffsets.instructionOffsetCount(); index++) { int producerOffset = producerOffsets.instructionOffset(index); // TODO: A method might be pushing the null constant. if (producerOffset >= 0 && codeAttribute.code[producerOffset] == InstructionConstants.OP_ACONST_NULL) { // Replace pushing null by pushing 0. replaceInstruction(clazz, producerOffset, new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), new SimpleInstruction(InstructionConstants.OP_ICONST_0)); } } }
!partialEvaluator.getStackAfter(offset).getTopActualProducerValue(0).instructionOffsetValue().contains(newArrayOffset))
!partialEvaluator.getStackAfter(offset).getTopActualProducerValue(0).instructionOffsetValue().contains(newArrayOffset))
!partialEvaluator.getStackAfter(offset).getTopActualProducerValue(0).instructionOffsetValue().contains(newArrayOffset))