Tiny fix to list comprehensions
rather than using the if_icmp instruction and comparing with a literal 'false', we can use the ifeq bytecode for an implicit comparison with zero.  False in java is represented as 0 in bytecode.  This saves a whole instruction!
GITHUB_BREAKING_CHANGES=none
@@ -457,11 +457,7 @@ final class ExpressionCompiler {
if (visitedFilter != null) {
visitedFilter.gen(adapter);
- BytecodeUtils.constant(false).gen(adapter);
- adapter.ifCmp(
- Type.BOOLEAN_TYPE,
- Opcodes.IFEQ,
- loopContinue); // if (!filter.test(a)) continue;
+ adapter.ifZCmp(Opcodes.IFEQ, loopContinue); // if (!filter.test(a)) continue;
}
resultVar.local().gen(adapter);
