Explorar el Código

* calculate complexity of exit nodes correctly

git-svn-id: trunk@25245 -
florian hace 12 años
padre
commit
5d4a094799
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10 0
      compiler/nutils.pas

+ 10 - 0
compiler/nutils.pas

@@ -673,6 +673,16 @@ implementation
 {$endif ARM}
 {$endif ARM}
                   exit;
                   exit;
                 end;
                 end;
+              exitn:
+                begin
+                  inc(result,2);
+                  if (result >= NODE_COMPLEXITY_INF) then
+                    begin
+                      result := NODE_COMPLEXITY_INF;
+                      exit;
+                    end;
+                  p:=texitnode(p).left;
+                end;
               tempcreaten,
               tempcreaten,
               tempdeleten,
               tempdeleten,
               pointerconstn,
               pointerconstn,