StandardInstructionVisitor: non-negative range for Enum.ordinal()

This commit is contained in:
Tagir Valeev
2017-09-29 12:46:19 +07:00
parent 354078660d
commit d835b789fa
@@ -54,7 +54,8 @@ public class StandardInstructionVisitor extends InstructionVisitor {
.register(CallMatcher.staticCall(CommonClassNames.JAVA_LANG_LONG, "numberOfLeadingZeros", "numberOfTrailingZeros", "bitCount"),
LongRangeSet.range(0, Long.SIZE))
.register(CallMatcher.staticCall(CommonClassNames.JAVA_LANG_INTEGER, "numberOfLeadingZeros", "numberOfTrailingZeros", "bitCount"),
LongRangeSet.range(0, Integer.SIZE));
LongRangeSet.range(0, Integer.SIZE))
.register(CallMatcher.instanceCall(CommonClassNames.JAVA_LANG_ENUM, "ordinal").parameterCount(0), LongRangeSet.indexRange());
private final Set<BinopInstruction> myReachable = new THashSet<>();
private final Set<BinopInstruction> myCanBeNullInInstanceof = new THashSet<>();