ソースを参照

* Indentation and casing changes

Michaël Van Canneyt 1 年間 前
コミット
325d29307f
3 ファイル変更61 行追加64 行削除
  1. 56 56
      compiler/fmodule.pas
  2. 1 4
      compiler/ngenutil.pas
  3. 4 4
      compiler/symtable.pas

+ 56 - 56
compiler/fmodule.pas

@@ -965,23 +965,23 @@ implementation
 
     procedure tmodule.loadlocalnamespacelist;
 
-    var
-      nsitem : TCmdStrListItem;
-
-    begin
-      // Copying local namespace list
-      if premodule_namespacelist.Count>0 then
-        begin
-        nsitem:=TCmdStrListItem(premodule_namespacelist.First);
-        while assigned(nsItem) do
+      var
+        nsitem : TCmdStrListItem;
+
+      begin
+        // Copying local namespace list
+        if premodule_namespacelist.Count>0 then
           begin
-          localnamespacelist.Concat(nsitem.Str);
-          nsItem:=TCmdStrListItem(nsitem.Next);
+          nsitem:=TCmdStrListItem(premodule_namespacelist.First);
+          while assigned(nsItem) do
+            begin
+            localnamespacelist.Concat(nsitem.Str);
+            nsItem:=TCmdStrListItem(nsitem.Next);
+            end;
+          premodule_namespacelist.Clear;
           end;
-        premodule_namespacelist.Clear;
-        end;
-      current_namespacelist:=localnamespacelist;
-    end;
+        current_namespacelist:=localnamespacelist;
+      end;
 
 
     procedure tmodule.adddependency(callermodule: tmodule; frominterface: boolean);
@@ -1039,53 +1039,53 @@ implementation
 
     function tmodule.usedunitsloaded(interface_units : boolean; out firstwaiting : tmodule): boolean;
 
-    const
-      statesneeded : array[boolean] of tmodulestates = ([ms_processed, ms_compiled,ms_compiling_waitimpl, ms_compiling_waitfinish],
-                                                        [ms_processed, ms_compiled,ms_compiling_waitimpl]);
+      const
+        statesneeded : array[boolean] of tmodulestates = ([ms_processed, ms_compiled,ms_compiling_waitimpl, ms_compiling_waitfinish],
+                                                          [ms_processed, ms_compiled,ms_compiling_waitimpl]);
 
-    var
-      itm : TLinkedListItem;
-      states : set of tmodulestate;
-
-    begin
-      Result:=True;
-      States:=statesneeded[interface_units];
-      itm:=self.used_units.First;
-      firstwaiting:=Nil;
-      while Result and assigned(itm) do
-        begin
-        result:=tused_unit(itm).u.state in states;
-        {$IFDEF DEBUG_CTASK}writeln('  ',ToString,' checking state of ', tused_unit(itm).u.ToString,' : ',tused_unit(itm).u.state,' : ',Result);{$ENDIF}
-        if not result then
-           begin
-           if firstwaiting=Nil then
-              firstwaiting:=tused_unit(itm).u;
-           end;
-        itm:=itm.Next;
-        end;
-    end;
+      var
+        itm : TLinkedListItem;
+        states : set of tmodulestate;
+
+      begin
+        Result:=True;
+        States:=statesneeded[interface_units];
+        itm:=self.used_units.First;
+        firstwaiting:=Nil;
+        while Result and assigned(itm) do
+          begin
+          result:=tused_unit(itm).u.state in states;
+          {$IFDEF DEBUG_CTASK}writeln('  ',ToString,' checking state of ', tused_unit(itm).u.ToString,' : ',tused_unit(itm).u.state,' : ',Result);{$ENDIF}
+          if not result then
+             begin
+             if firstwaiting=Nil then
+                firstwaiting:=tused_unit(itm).u;
+             end;
+          itm:=itm.Next;
+          end;
+      end;
 
     function tmodule.nowaitingforunits: Boolean;
 
-    begin
-      Result:=waitingforunit.count=0;
-    end;
+      begin
+        Result:=waitingforunit.count=0;
+      end;
 
     function tmodule.usesmodule_in_interface(m: tmodule): boolean;
 
-    var
-      u : tused_unit;
-
-    begin
-      result:=False;
-      u:=tused_unit(used_units.First);
-      while assigned(u) do
-        begin
-        if (u.u=m) then
-          exit(u.in_interface) ;
-        u:=tused_unit(u.next);
-        end;
-    end;
+      var
+        u : tused_unit;
+
+      begin
+        result:=False;
+        u:=tused_unit(used_units.First);
+        while assigned(u) do
+          begin
+          if (u.u=m) then
+            exit(u.in_interface) ;
+          u:=tused_unit(u.next);
+          end;
+      end;
 
     procedure tmodule.updatemaps;
       var
@@ -1271,7 +1271,7 @@ implementation
       end;
 
 
-        procedure tmodule.AddExternalImport(const libname, symname, symmangledname: string; OrdNr: longint; isvar: boolean;
+    procedure tmodule.AddExternalImport(const libname, symname, symmangledname: string; OrdNr: longint; isvar: boolean;
       ImportByOrdinalOnly: boolean);
       var
         ImportLibrary,OtherIL : TImportLibrary;

+ 1 - 4
compiler/ngenutil.pas

@@ -1049,11 +1049,8 @@ implementation
                  entry^.finifunc:=make_mangledname('FINALIZE$',hp.u.globalsymtable,'')
                else
                  entry^.finifunc:='';
-               { Writeln('Adding Init/final for: ',hp.u.modulename^); }
                result.add(entry);
-             end
-           {else
-              Writeln('NOT Adding Init/final for: ',hp.u.modulename^);}
+             end;
            end;
          hp:=tused_unit(hp.next);
        end;

+ 4 - 4
compiler/symtable.pas

@@ -78,8 +78,8 @@ interface
           procedure checklabels;
           function  needs_init_final : boolean; virtual;
           function  has_non_trivial_init:boolean;virtual;
-          function is_derefimpl_built: Boolean;
-          function is_deref_built: Boolean;
+          function is_derefimpl_built: boolean;
+          function is_deref_built: boolean;
           procedure testfordefaultproperty(sym:TObject;arg:pointer);
           procedure register_children;
        end;
@@ -704,12 +704,12 @@ implementation
         ppufile.writeentry(ibendsyms);
       end;
 
-    function tstoredsymtable.is_deref_built: Boolean;
+    function tstoredsymtable.is_deref_built: boolean;
     begin
       Result:=deref_built;
     end;
 
-    function tstoredsymtable.is_derefimpl_built: Boolean;
+    function tstoredsymtable.is_derefimpl_built: boolean;
     begin
       Result:=derefimpl_built;
     end;