void (@NotNull PsiPattern pattern, @Nullable DfaAnchor instanceofAnchor, @NotNull DeferredOffset endPatternOffset, @NotNull DfaVariableValue patternDfaVar) { DeferredOffset condGotoOffset; addInstruction(new DupInstruction()); addInstruction( new PushValueInstruction(DfTypes.typedObject(JavaPsiPatternUtil.getPatternType(pattern), Nullability.NOT_NULL))); addInstruction(new InstanceofInstruction(instanceofAnchor, false)); condGotoOffset = new DeferredOffset(); addInstruction(new ConditionalGotoInstruction(condGotoOffset, DfTypes.TRUE)); addInstruction(new PopInstruction()); addInstruction(new PushValueInstruction(DfTypes.FALSE)); addInstruction(new GotoInstruction(endPatternOffset)); SimpleAssignmentInstruction assignmentInstr = new SimpleAssignmentInstruction(null, patternDfaVar); addInstruction(assignmentInstr); condGotoOffset.setOffset(assignmentInstr.getIndex()); }