瀏覽代碼

* calculate complexity of exit nodes correctly

git-svn-id: trunk@25245 -
florian 12 年之前
父節點
當前提交
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,