Просмотр исходного кода

* calculate complexity of exit nodes correctly

git-svn-id: trunk@25245 -
florian 12 лет назад
Родитель
Сommit
5d4a094799
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      compiler/nutils.pas

+ 10 - 0
compiler/nutils.pas

@@ -673,6 +673,16 @@ implementation
 {$endif ARM}
                   exit;
                 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,
               tempdeleten,
               pointerconstn,