/** * Creates a new InstructionSequenceReplacer. * @param patternConstants any constants referenced by the pattern * instruction. * @param branchTargetFinder a branch target finder that has been * initialized to indicate branch targets * in the visited code. * @param codeAttributeEditor a code editor that can be used for * accumulating changes to the code. * @param extraInstructionVisitor an optional extra visitor for all deleted * load instructions. */ public InstructionSequenceReplacer(Constant[] patternConstants, Instruction[] patternInstructions, Instruction[] replacementInstructions, BranchTargetFinder branchTargetFinder, CodeAttributeEditor codeAttributeEditor, InstructionVisitor extraInstructionVisitor) { this.instructionSequenceMatcher = new InstructionSequenceMatcher(patternConstants, patternInstructions); this.replacementInstructions = replacementInstructions; this.branchTargetFinder = branchTargetFinder; this.codeAttributeEditor = codeAttributeEditor; this.extraInstructionVisitor = extraInstructionVisitor; }
InstructionVisitor extraInstructionVisitor) this(new InstructionSequenceMatcher(patternConstants, patternInstructions), patternConstants, patternInstructions,
InstructionVisitor extraInstructionVisitor) this(new InstructionSequenceMatcher(patternConstants, patternInstructions), patternConstants, patternInstructions,
InstructionVisitor extraInstructionVisitor) this(new InstructionSequenceMatcher(patternConstants, patternInstructions), patternConstants, patternInstructions,
knownItegerUpdaterMatcher = new InstructionSequenceMatcher(constants, knownItegerUpdaterInstructions); knownLongUpdaterMatcher = new InstructionSequenceMatcher(constants, knownLongUpdaterInstructions); knownReferenceUpdaterMatcher = new InstructionSequenceMatcher(constants, knownReferenceUpdaterInstructions); unknownIntegerUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownIntegerUpdaterInstructions); unknownLongUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownLongUpdaterInstructions); unknownReferenceUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownReferenceUpdaterInstructions);
knownItegerUpdaterMatcher = new InstructionSequenceMatcher(constants, knownItegerUpdaterInstructions); knownLongUpdaterMatcher = new InstructionSequenceMatcher(constants, knownLongUpdaterInstructions); knownReferenceUpdaterMatcher = new InstructionSequenceMatcher(constants, knownReferenceUpdaterInstructions); unknownIntegerUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownIntegerUpdaterInstructions); unknownLongUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownLongUpdaterInstructions); unknownReferenceUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownReferenceUpdaterInstructions);
knownItegerUpdaterMatcher = new InstructionSequenceMatcher(constants, knownItegerUpdaterInstructions); knownLongUpdaterMatcher = new InstructionSequenceMatcher(constants, knownLongUpdaterInstructions); knownReferenceUpdaterMatcher = new InstructionSequenceMatcher(constants, knownReferenceUpdaterInstructions); unknownIntegerUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownIntegerUpdaterInstructions); unknownLongUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownLongUpdaterInstructions); unknownReferenceUpdaterMatcher = new InstructionSequenceMatcher(constants, unknownReferenceUpdaterInstructions);