trying to fix an optimisation bug... does this fix it properly?

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@46 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-08-26 07:00:38 +00:00
parent 8e349ffdb3
commit fd96c51c5b
1 changed files with 4 additions and 3 deletions

View File

@ -3804,10 +3804,11 @@ QCC_def_t *QCC_PR_Expression (int priority)
if (op->priority == 7 && opt_logicops)
{
optres_logicops++;
if (*op->name == '&')
QCC_PR_Statement(&pr_opcodes[OP_IFNOT], e, NULL, &st);
st = &statements[numstatements];
if (*op->name == '&') //statement 3 because we don't want to optimise this into if from not ifnot
QCC_PR_Statement3(&pr_opcodes[OP_IFNOT], e, NULL, NULL);
else
QCC_PR_Statement(&pr_opcodes[OP_IF], e, NULL, &st);
QCC_PR_Statement3(&pr_opcodes[OP_IF], e, NULL, NULL);
}
e2 = QCC_PR_Expression (priority-1);