Graham
f742aba80d
Replace simple if condition swapping heuristic with a smarter one
...
This allows us to change expressions like `!a && !b` to `a || b`. It
isn't perfect, as we will now flip bitwise flag checks (which was one of
the main motivations for the old heuristic).
5 years ago
Graham
e202c4fcb9
Clone if/else arms before swapping them
...
This fixes a bug where some of the later transforms didn't run on the
swapped arms.
5 years ago
Graham
eec8990481
Add description to all modules
5 years ago
Graham
012d5ed0db
Simplify combined shift/mask operations
5 years ago
Graham
7d959ed135
Remove and later re-add brackets to simplify intermediate transforms
5 years ago
Graham
14354a22f3
Transform `-x + y` to `y - x` unless both have side effects
5 years ago
Graham
fcc053270d
Remove NegateExprVisitor
...
It's actually cleaner to do this without one!
5 years ago
Graham
12d3af48dd
Add TernaryTransformer
5 years ago
Graham
eadea9231c
Add AddSubTransformer
5 years ago
Graham
0b1d46eec4
Rename AddSubTransformer to NegativeLiteralTransformer
5 years ago
Graham
b6007c070b
Add PLUS operator support to BinaryExprOrderTransformer
5 years ago
Graham
e9b2ad6d62
Add initial BinaryExprOrderTransformer
5 years ago
Graham
5e616b2d88
Use Preconditions.checkArgument() in NegateExprVisitor
5 years ago
Graham
27346725e3
Swap if arms if the condition is inverted
5 years ago
Graham
556923559c
Add initial transformer for reducing nesting in long if/else chains
5 years ago
Graham
bf55b0d901
Add initial AST deobfuscator
5 years ago