CFGBuilder (PsiExpression[] expressions, DfaVariableValue targetVariable, @Nullable PsiType type) { DfaValueFactory factory = getFactory(); if (expressions.length > ControlFlowAnalyzer.MAX_UNROLL_SIZE) { for (PsiExpression expression : expressions) { pushExpression(expression); pop(); } ConditionalGotoInstruction condGoto = new ConditionalGotoInstruction(null, DfTypes.TRUE, null); condGoto.setOffset(myAnalyzer.getInstructionCount()); myBranches.add(() -> pushUnknown().add(condGoto)); DfaValue commonValue = JavaDfaValueFactory.createCommonValue(factory, expressions, type); if (DfaTypeValue.isUnknown(commonValue)) { flush(targetVariable).push(targetVariable); } else { pushForWrite(targetVariable).push(commonValue).assign(); } } else { push(factory.getSentinel()); for (PsiExpression expression : expressions) { pushExpression(expression); boxUnbox(expression, type); } // Revert order add(new SpliceInstruction(expressions.length, IntStreamEx.ofIndices(expressions).toArray())); GotoInstruction gotoInstruction = new GotoInstruction(null, false); gotoInstruction.setOffset(myAnalyzer.getInstructionCount()); dup().push(factory.getSentinel()).compare(RelationType.EQ); ConditionalGotoInstruction condGoto = new ConditionalGotoInstruction(null, DfTypes.TRUE); add(condGoto); assignTo(targetVariable); myBranches.add(() -> { add(gotoInstruction); condGoto.setOffset(myAnalyzer.getInstructionCount()); pop(); }); } return this; }