diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-06 14:55:50 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-06 14:55:50 +0000 |
commit | 568dee2a095ebba6019c92bb8c447bd50c80864d (patch) | |
tree | 9ee367928052fd9b05a3de0d70fe68b6dd82f6a4 | |
parent | ede15e2b08e0b4899d361ec8d0aca87b0c16d4e1 (diff) | |
download | fpc-568dee2a095ebba6019c92bb8c447bd50c80864d.tar.gz |
* improved last commit, better handling of boolean expressions
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48885 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/nadd.pas | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/nadd.pas b/compiler/nadd.pas index 42c86e3c27..857b152aaf 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -1715,7 +1715,7 @@ implementation (left.resultdef.typ=orddef) and (left.nodetype=andn) and (right.nodetype=andn) and - not(is_boolean(resultdef) or (cs_full_boolean_eval in current_settings.localswitches)) and + not(is_boolean(resultdef) or not(might_have_sideeffects(self,[mhs_exceptions])) or not(doshortbooleval(self))) and { this test is not needed but it speeds up the test and allows to bail out early } ((taddnode(left).left.nodetype=notn) or (taddnode(left).right.nodetype=notn) or (taddnode(right).left.nodetype=notn) or (taddnode(right).right.nodetype=notn) |