|
@@ -197,8 +197,9 @@ unit optconstprop;
|
|
{ constant inc'ed/dec'ed? }
|
|
{ constant inc'ed/dec'ed? }
|
|
if (tinlinenode(n).inlinenumber=in_dec_x) or (tinlinenode(n).inlinenumber=in_inc_x) then
|
|
if (tinlinenode(n).inlinenumber=in_dec_x) or (tinlinenode(n).inlinenumber=in_inc_x) then
|
|
begin
|
|
begin
|
|
- if not(assigned(tcallparanode(tinlinenode(n).left).right)) and
|
|
|
|
- tnode(tassignmentnode(arg).left).isequal(tcallparanode(tinlinenode(n).left).left) then
|
|
|
|
|
|
+ if tnode(tassignmentnode(arg).left).isequal(tcallparanode(tinlinenode(n).left).left) and
|
|
|
|
+ (not(assigned(tcallparanode(tinlinenode(n).left).right)) or
|
|
|
|
+ (tcallparanode(tcallparanode(tinlinenode(n).left).right).left.nodetype=ordconstn)) then
|
|
begin
|
|
begin
|
|
{ if the node just being searched is inc'ed/dec'ed then replace the inc/dec
|
|
{ if the node just being searched is inc'ed/dec'ed then replace the inc/dec
|
|
by add/sub and force a second replacement pass }
|
|
by add/sub and force a second replacement pass }
|