Procházet zdrojové kódy

* better constant propation for inline nodes

florian před 3 roky
rodič
revize
c79df5f0fc
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      compiler/optconstprop.pas

+ 4 - 2
compiler/optconstprop.pas

@@ -214,12 +214,14 @@ unit optconstprop;
                     result:=false;
                     exit;
                   end;
+                { inc/dec might have a side effect, so stop here for now }
+                result:=false;
+                exit;
               end
             else if might_have_sideeffects(n) then
               exit(false);
 
-            replaceBasicAssign(tunarynode(n).left, arg, tree_modified);
-            result:=false;
+            result:=replaceBasicAssign(tunarynode(n).left, arg, tree_modified);
           end
         else if n.nodetype=calln then
           begin