CreateAnd and CreateOr are used in such a way that both arguments are fully computed before the test is performed, reducing opportunity for short-circuiting.
The way we write the code, both arguments to CreateOr will already emit code even before the method is invoked. Then the actual OR operation is emitted.
I suggest we rewrite both operators similarly to what we do for createSelect2, this is, we take functions for the arguments.
Going a step further, we could also take a vectors of functions instead of a fixed two args (see isVector())
CreateAnd and CreateOr are used in such a way that both arguments are fully computed before the test is performed, reducing opportunity for short-circuiting.
Ex.
The way we write the code, both arguments to CreateOr will already emit code even before the method is invoked. Then the actual OR operation is emitted. I suggest we rewrite both operators similarly to what we do for createSelect2, this is, we take functions for the arguments. Going a step further, we could also take a vectors of functions instead of a fixed two args (see isVector())