Browse Source

* make some checks EXTDEBUG only for now so linux cycles again

peter 21 years ago
parent
commit
1687306d22
2 changed files with 24 additions and 10 deletions
  1. 12 9
      compiler/pdecsub.pas
  2. 12 1
      compiler/symdef.pas

+ 12 - 9
compiler/pdecsub.pas

@@ -68,18 +68,14 @@ implementation
        globtype,globals,verbose,
        globtype,globals,verbose,
        systems,
        systems,
        cpuinfo,
        cpuinfo,
-       { aasm }
-       aasmbase,
        { symtable }
        { symtable }
        symbase,symtable,defutil,defcmp,paramgr,cpupara,
        symbase,symtable,defutil,defcmp,paramgr,cpupara,
        { pass 1 }
        { pass 1 }
        node,htypechk,
        node,htypechk,
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,
        { parser }
        { parser }
-       fmodule,scanner,
-       pbase,pexpr,ptype,pdecl,
-       { linking }
-       import,gendef
+       scanner,
+       pbase,pexpr,ptype,pdecl
        ;
        ;
 
 
     const
     const
@@ -1814,8 +1810,10 @@ const
                     { Win32 imports need to use the normal name since to functions
                     { Win32 imports need to use the normal name since to functions
                       can refer to the same DLL function. This is also needed for compatability
                       can refer to the same DLL function. This is also needed for compatability
                       with Delphi and TP7 }
                       with Delphi and TP7 }
-                    if assigned(pd.import_dll) and
-                       not(target_info.system in [system_i386_win32,system_i386_wdosx]) then
+                    if not(
+                           assigned(pd.import_dll) and
+                           (target_info.system in [system_i386_win32,system_i386_wdosx])
+                          ) then
                       pd.setmangledname(pd.import_name^);
                       pd.setmangledname(pd.import_name^);
                   end
                   end
                 else
                 else
@@ -2178,6 +2176,7 @@ const
                      { Body declaration is external? }
                      { Body declaration is external? }
                      if (po_external in pd.procoptions) then
                      if (po_external in pd.procoptions) then
                        begin
                        begin
+{$ifdef EXTDEBUG}
                          { Win32 supports declaration in interface and external in
                          { Win32 supports declaration in interface and external in
                            implementation for dll imports. Support this for backwards
                            implementation for dll imports. Support this for backwards
                            compatibility with Tp7 and Delphi }
                            compatibility with Tp7 and Delphi }
@@ -2186,6 +2185,7 @@ const
                                 assigned(pd.import_dll)
                                 assigned(pd.import_dll)
                                ) then
                                ) then
                            MessagePos(pd.fileinfo,parser_e_proc_no_external_allowed);
                            MessagePos(pd.fileinfo,parser_e_proc_no_external_allowed);
+{$endif EXTDEBUG}
                        end;
                        end;
 
 
                    { Check parameters }
                    { Check parameters }
@@ -2328,7 +2328,10 @@ const
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.208  2004-11-17 22:21:35  peter
+  Revision 1.209  2004-11-17 22:41:41  peter
+    * make some checks EXTDEBUG only for now so linux cycles again
+
+  Revision 1.208  2004/11/17 22:21:35  peter
   mangledname setting moved to place after the complete proc declaration is read
   mangledname setting moved to place after the complete proc declaration is read
   import generation moved to place where body is also parsed (still gives problems with win32)
   import generation moved to place where body is also parsed (still gives problems with win32)
 
 

+ 12 - 1
compiler/symdef.pas

@@ -4368,11 +4368,19 @@ implementation
 
 
     procedure tprocdef.setmangledname(const s : string);
     procedure tprocdef.setmangledname(const s : string);
       begin
       begin
+{$ifdef EXTDEBUG}
         { This is not allowed anymore, the forward declaration
         { This is not allowed anymore, the forward declaration
           already needs to create the correct mangledname, no changes
           already needs to create the correct mangledname, no changes
           afterwards are allowed (PFV) }
           afterwards are allowed (PFV) }
         if assigned(_mangledname) then
         if assigned(_mangledname) then
           internalerror(200411171);
           internalerror(200411171);
+{$else}
+        if assigned(_mangledname) then
+          begin
+            objectlibrary.renameasmsymbol(_mangledname^,s);
+            stringdispose(_mangledname);
+          end;
+{$endif EXTDEBUG}
       {$ifdef compress}
       {$ifdef compress}
         _mangledname:=stringdup(minilzw_encode(s));
         _mangledname:=stringdup(minilzw_encode(s));
       {$else}
       {$else}
@@ -6134,7 +6142,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.273  2004-11-17 22:21:35  peter
+  Revision 1.274  2004-11-17 22:41:41  peter
+    * make some checks EXTDEBUG only for now so linux cycles again
+
+  Revision 1.273  2004/11/17 22:21:35  peter
   mangledname setting moved to place after the complete proc declaration is read
   mangledname setting moved to place after the complete proc declaration is read
   import generation moved to place where body is also parsed (still gives problems with win32)
   import generation moved to place where body is also parsed (still gives problems with win32)