Selaa lähdekoodia

* improve complexity calculation for tempref nodes

florian 5 kuukautta sitten
vanhempi
commit
d87ba06608
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      compiler/nutils.pas

+ 7 - 1
compiler/nutils.pas

@@ -730,10 +730,16 @@ implementation
                   result:=2;
                   exit;
                 end;
+              temprefn:
+                begin
+                  if (ttemprefnode(p).tempinfo^.typedef.needs_inittable) or
+                    not(ti_may_be_in_reg in ttemprefnode(p).tempflags) then
+                    result := 1;
+                  exit;
+                end;
               rttin,
               setconstn,
               stringconstn,
-              temprefn,
               loadvmtaddrn,
               { main reason for the next one: we can't take the address of }
               { loadparentfpnode, so replacing it by a temp which is the   }