@Test public void testGetFlagBits() { check(1); check(4); check(0x10000000L); check(0x80000000L); check(0x100000000L); check(0x10000000000L); check(Long.MIN_VALUE >>> 1); check(Long.MIN_VALUE); }
static long getFlagBits(boolean isLong, long arg0) { long bits = arg0; if (isLong) { if (populationCount(bits) > populationCount(~bits)) { bits = ~bits; } } else if (populationCount(0xffffffffL & bits) > populationCount(0xffffffffL & ~bits)) { bits = 0xffffffffL & ~bits; } return bits; }
IncompatMask extends OpcodeStackDetector { static long getFlagBits(boolean isLong, long arg0) { long bits = arg0; if (isLong) { if (populationCount(bits) > populationCount(~bits)) { bits = ~bits; } } else if (populationCount(0xffffffffL & bits) > populationCount(0xffffffffL & ~bits)) { bits = 0xffffffffL & ~bits; } return bits; } }
IncompatMask extends OpcodeStackDetector { static long getFlagBits(boolean isLong, long arg0) { long bits = arg0; if (isLong) { if (populationCount(bits) > populationCount(~bits)) { bits = ~bits; } } else if (populationCount(0xffffffffL & bits) > populationCount(0xffffffffL & ~bits)) { bits = 0xffffffffL & ~bits; } return bits; } IncompatMask(BugReporter bugReporter); }
IncompatMask extends OpcodeStackDetector { static long getFlagBits(boolean isLong, long arg0) { long bits = arg0; if (isLong) { if (populationCount(bits) > populationCount(~bits)) { bits = ~bits; } } else if (populationCount(0xffffffffL & bits) > populationCount(0xffffffffL & ~bits)) { bits = 0xffffffffL & ~bits; } return bits; } IncompatMask(BugReporter bugReporter); @Override void visit(Code obj); @Override void sawOpcode(int seen); @Override void afterOpcode(int seen); }
IncompatMask extends OpcodeStackDetector { static long getFlagBits(boolean isLong, long arg0) { long bits = arg0; if (isLong) { if (populationCount(bits) > populationCount(~bits)) { bits = ~bits; } } else if (populationCount(0xffffffffL & bits) > populationCount(0xffffffffL & ~bits)) { bits = 0xffffffffL & ~bits; } return bits; } IncompatMask(BugReporter bugReporter); @Override void visit(Code obj); @Override void sawOpcode(int seen); @Override void afterOpcode(int seen);  }