Parcourir la source

* indention and new line fixes

git-svn-id: trunk@25963 -
florian il y a 11 ans
Parent
commit
9fdd64e94c
2 fichiers modifiés avec 54 ajouts et 55 suppressions
  1. 4 5
      compiler/nmem.pas
  2. 50 50
      compiler/pass_1.pas

+ 4 - 5
compiler/nmem.pas

@@ -1001,8 +1001,6 @@ implementation
                      hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
                      hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
                      hightree.free;
                      hightree.free;
                    end;
                    end;
-
-
              end;
              end;
            pointerdef :
            pointerdef :
              begin
              begin
@@ -1065,11 +1063,12 @@ implementation
         end;
         end;
       end;
       end;
 
 
+
     procedure Tvecnode.mark_write;
     procedure Tvecnode.mark_write;
+      begin
+        include(flags,nf_write);
+      end;
 
 
-    begin
-      include(flags,nf_write);
-    end;
 
 
     function tvecnode.pass_1 : tnode;
     function tvecnode.pass_1 : tnode;
       begin
       begin

+ 50 - 50
compiler/pass_1.pas

@@ -158,61 +158,61 @@ implementation
                 include(current_procinfo.flags,pi_do_call);
                 include(current_procinfo.flags,pi_do_call);
               { determine the resultdef if not done }
               { determine the resultdef if not done }
               if (p.resultdef=nil) then
               if (p.resultdef=nil) then
-               begin
-                 hp:=p.pass_typecheck;
-                 { should the node be replaced? }
-                 if assigned(hp) then
-                  begin
+                begin
+                  hp:=p.pass_typecheck;
+                  { should the node be replaced? }
+                  if assigned(hp) then
+                   begin
+                      p.free;
+                      { switch to new node }
+                      p:=hp;
+                      { run typecheckpass }
+                      typecheckpass(p);
+                   end;
+                  if codegenerror then
+                   begin
+                     include(p.flags,nf_error);
+                     { default to errortype if no type is set yet }
+                     if p.resultdef=nil then
+                      p.resultdef:=generrordef;
+                   end;
+                  codegenerror:=codegenerror or oldcodegenerror;
+                end;
+              if not(nf_error in p.flags) then
+                begin
+                  { first pass }
+                  hp:=p.pass_1;
+                  { should the node be replaced? }
+                  if assigned(hp) then
+                   begin
                      p.free;
                      p.free;
                      { switch to new node }
                      { switch to new node }
-                     p:=hp;
-                     { run typecheckpass }
-                     typecheckpass(p);
-                  end;
-                 if codegenerror then
-                  begin
-                    include(p.flags,nf_error);
-                    { default to errortype if no type is set yet }
-                    if p.resultdef=nil then
-                     p.resultdef:=generrordef;
-                  end;
-                 codegenerror:=codegenerror or oldcodegenerror;
-               end;
-              if not(nf_error in p.flags) then
-               begin
-                 { first pass }
-                 hp:=p.pass_1;
-                 { should the node be replaced? }
-                 if assigned(hp) then
-                  begin
-                    p.free;
-                    { switch to new node }
-                    p := hp;
-                    { run firstpass }
-                    firstpass(p);
-                  end
-                 else
+                     p := hp;
+                     { run firstpass }
+                     firstpass(p);
+                   end
+                  else
+                    begin
+                      { inlining happens in pass_1 and can cause new }
+                      { simplify opportunities                       }
+                      hp:=p.simplify(true);
+                      if assigned(hp) then
+                        begin
+                          p.free;
+                          p := hp;
+                          firstpass(p);
+                        end;
+                    end;
+                  if codegenerror then
+                   include(p.flags,nf_error)
+                  else
                    begin
                    begin
-                     { inlining happens in pass_1 and can cause new }
-                     { simplify opportunities                       }
-                     hp:=p.simplify(true);
-                     if assigned(hp) then
-                       begin
-                         p.free;
-                         p := hp;
-                         firstpass(p);
-                       end;
-                   end;
-                 if codegenerror then
-                  include(p.flags,nf_error)
-                 else
-                  begin
 {$ifdef EXTDEBUG}
 {$ifdef EXTDEBUG}
-                    if (p.expectloc=LOC_INVALID) then
-                      Comment(V_Warning,'Expectloc is not set in firstpass: '+nodetype2str[p.nodetype]);
+                     if (p.expectloc=LOC_INVALID) then
+                       Comment(V_Warning,'Expectloc is not set in firstpass: '+nodetype2str[p.nodetype]);
 {$endif EXTDEBUG}
 {$endif EXTDEBUG}
-                  end;
-               end;
+                   end;
+                end;
               include(p.flags,nf_pass1_done);
               include(p.flags,nf_pass1_done);
               codegenerror:=codegenerror or oldcodegenerror;
               codegenerror:=codegenerror or oldcodegenerror;
               current_settings.localswitches:=oldlocalswitches;
               current_settings.localswitches:=oldlocalswitches;