Browse Source

Fix bug introduced in commit #47709, by only calling node_complexity if first pass was already done (bug report 38183)

git-svn-id: trunk@47720 -
pierre 4 năm trước cách đây
mục cha
commit
348be7657d
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      compiler/node.pas

+ 5 - 2
compiler/node.pas

@@ -896,7 +896,9 @@ implementation
                 first:=false;
               write(t, i);
             end;
-        write(t,'], cmplx = ',node_complexity(self));
+        write(t,']');
+        if (nf_pass1_done in flags) then
+          write(t,', cmplx = ',node_complexity(self));
       end;
 
 
@@ -942,7 +944,8 @@ implementation
                 Write(T, ',', i)
             end;
 
-        write(t,'" complexity="',node_complexity(self),'"');
+        if (nf_pass1_done in flags) then
+          write(t,'" complexity="',node_complexity(self),'"');
       end;
 
     procedure tnode.XMLPrintNodeData(var T: Text);