lbadd
lbadd copied to clipboard
compiler: optimize constant expressions
Optimize constant expressions, so that the executor does not have to evaluate expressions like these.
-
1 == 2=>false -
false == true=>false -
a IS bwhereaandbare different constant values =>false -
1 BETWEEN 5 AND 6=>false - etc.
There is a lot of room for creativity here. Please take note, that optimizations require extensive testing, so that nothing is optimized in a wrong way. This means, that to complete this ticket, a lot of positive and negative test cases are required.