Browse Source

* Split po_public into po_public and po_global (Peter)

michael 21 years ago
parent
commit
180966c0aa
6 changed files with 39 additions and 18 deletions
  1. 6 3
      compiler/ncgutil.pas
  2. 8 4
      compiler/pdecsub.pas
  3. 5 2
      compiler/pmodules.pas
  4. 6 3
      compiler/psub.pas
  5. 6 2
      compiler/symconst.pas
  6. 8 4
      compiler/utils/ppudump.pp

+ 6 - 3
compiler/ncgutil.pas

@@ -1566,7 +1566,7 @@ implementation
 {$ifdef GDB}
 {$ifdef GDB}
         if (cs_debuginfo in aktmoduleswitches) then
         if (cs_debuginfo in aktmoduleswitches) then
           begin
           begin
-            if (po_public in current_procinfo.procdef.procoptions) then
+            if (po_global in current_procinfo.procdef.procoptions) then
               Tprocsym(current_procinfo.procdef.procsym).is_global:=true;
               Tprocsym(current_procinfo.procdef.procsym).is_global:=true;
             current_procinfo.procdef.concatstabto(list);
             current_procinfo.procdef.concatstabto(list);
             Tprocsym(current_procinfo.procdef.procsym).isstabwritten:=true;
             Tprocsym(current_procinfo.procdef.procsym).isstabwritten:=true;
@@ -1583,7 +1583,7 @@ implementation
           list.concat(Tai_stab_function_name.create(strpnew(hs)));
           list.concat(Tai_stab_function_name.create(strpnew(hs)));
 {$endif GDB}
 {$endif GDB}
           if (cs_profile in aktmoduleswitches) or
           if (cs_profile in aktmoduleswitches) or
-             (po_public in current_procinfo.procdef.procoptions) then
+             (po_global in current_procinfo.procdef.procoptions) then
             list.concat(Tai_symbol.createname_global(hs,AT_FUNCTION,0))
             list.concat(Tai_symbol.createname_global(hs,AT_FUNCTION,0))
           else
           else
             list.concat(Tai_symbol.createname(hs,AT_FUNCTION,0));
             list.concat(Tai_symbol.createname(hs,AT_FUNCTION,0));
@@ -2210,7 +2210,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.241  2004-11-15 23:35:31  peter
+  Revision 1.242  2004-11-19 08:17:01  michael
+  * Split po_public into po_public and po_global (Peter)
+
+  Revision 1.241  2004/11/15 23:35:31  peter
     * tparaitem removed, use tparavarsym instead
     * tparaitem removed, use tparavarsym instead
     * parameter order is now calculated from paranr value in tparavarsym
     * parameter order is now calculated from paranr value in tparavarsym
 
 

+ 8 - 4
compiler/pdecsub.pas

@@ -803,7 +803,7 @@ implementation
             (symtablestack.symtabletype=objectsymtable) or
             (symtablestack.symtabletype=objectsymtable) or
             (symtablestack.symtablelevel=main_program_level)
             (symtablestack.symtablelevel=main_program_level)
            ) then
            ) then
-          include(pd.procoptions,po_public);
+          include(pd.procoptions,po_global);
 
 
         { symbol options that need to be kept per procdef }
         { symbol options that need to be kept per procdef }
         pd.fileinfo:=procstartfilepos;
         pd.fileinfo:=procstartfilepos;
@@ -1369,7 +1369,7 @@ const
       pd_flags : [pd_body,pd_interface,pd_implemen,pd_notobjintf];
       pd_flags : [pd_body,pd_interface,pd_implemen,pd_notobjintf];
       handler  : @pd_export;
       handler  : @pd_export;
       pocall   : pocall_none;
       pocall   : pocall_none;
-      pooption : [po_exports,po_public];
+      pooption : [po_exports,po_global];
       mutexclpocall : [pocall_internproc,pocall_inline];
       mutexclpocall : [pocall_internproc,pocall_inline];
       mutexclpotype : [potype_constructor,potype_destructor];
       mutexclpotype : [potype_constructor,potype_destructor];
       mutexclpo     : [po_external,po_interrupt]
       mutexclpo     : [po_external,po_interrupt]
@@ -1523,7 +1523,7 @@ const
       pd_flags : [pd_implemen,pd_body,pd_notobject,pd_notobjintf];
       pd_flags : [pd_implemen,pd_body,pd_notobject,pd_notobjintf];
       handler  : @pd_public;
       handler  : @pd_public;
       pocall   : pocall_none;
       pocall   : pocall_none;
-      pooption : [po_public];
+      pooption : [po_public,po_global];
       mutexclpocall : [pocall_internproc,pocall_inline];
       mutexclpocall : [pocall_internproc,pocall_inline];
       mutexclpotype : [];
       mutexclpotype : [];
       mutexclpo     : [po_external]
       mutexclpo     : [po_external]
@@ -1967,6 +1967,7 @@ const
           begin
           begin
             tprocdef(pd).aliasnames.insert(tprocdef(pd).procsym.realname);
             tprocdef(pd).aliasnames.insert(tprocdef(pd).procsym.realname);
             include(pd.procoptions,po_public);
             include(pd.procoptions,po_public);
+            include(pd.procoptions,po_has_public_name);
           end;
           end;
 
 
         while token in [_ID,_LECKKLAMMER] do
         while token in [_ID,_LECKKLAMMER] do
@@ -2328,7 +2329,10 @@ const
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.209  2004-11-17 22:41:41  peter
+  Revision 1.210  2004-11-19 08:17:01  michael
+  * Split po_public into po_public and po_global (Peter)
+
+  Revision 1.209  2004/11/17 22:41:41  peter
     * make some checks EXTDEBUG only for now so linux cycles again
     * make some checks EXTDEBUG only for now so linux cycles again
 
 
   Revision 1.208  2004/11/17 22:21:35  peter
   Revision 1.208  2004/11/17 22:21:35  peter

+ 5 - 2
compiler/pmodules.pas

@@ -786,7 +786,7 @@ implementation
         inc(ps.refs);
         inc(ps.refs);
         symtablestack.insert(ps);
         symtablestack.insert(ps);
         pd:=tprocdef.create(main_program_level);
         pd:=tprocdef.create(main_program_level);
-        include(pd.procoptions,po_public);
+        include(pd.procoptions,po_global);
         pd.procsym:=ps;
         pd.procsym:=ps;
         ps.addprocdef(pd);
         ps.addprocdef(pd);
         { restore symtable }
         { restore symtable }
@@ -1521,7 +1521,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.175  2004-11-16 20:32:40  peter
+  Revision 1.176  2004-11-19 08:17:02  michael
+  * Split po_public into po_public and po_global (Peter)
+
+  Revision 1.175  2004/11/16 20:32:40  peter
   * fixes for win32 mangledname
   * fixes for win32 mangledname
 
 
   Revision 1.174  2004/11/15 23:35:31  peter
   Revision 1.174  2004/11/15 23:35:31  peter

+ 6 - 3
compiler/psub.pas

@@ -1149,7 +1149,7 @@ implementation
             { set also the interface flag, for better error message when the
             { set also the interface flag, for better error message when the
               implementation doesn't much this header }
               implementation doesn't much this header }
             pd.interfacedef:=true;
             pd.interfacedef:=true;
-            include(pd.procoptions,po_public);
+            include(pd.procoptions,po_global);
             pdflags:=[pd_interface];
             pdflags:=[pd_interface];
           end
           end
          else
          else
@@ -1159,7 +1159,7 @@ implementation
               include(pdflags,pd_implemen);
               include(pdflags,pd_implemen);
             if (not current_module.is_unit) or
             if (not current_module.is_unit) or
                maybe_smartlink_symbol then
                maybe_smartlink_symbol then
-              include(pd.procoptions,po_public);
+              include(pd.procoptions,po_global);
             pd.forwarddef:=false;
             pd.forwarddef:=false;
           end;
           end;
 
 
@@ -1438,7 +1438,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.217  2004-11-17 22:21:35  peter
+  Revision 1.218  2004-11-19 08:17:02  michael
+  * Split po_public into po_public and po_global (Peter)
+
+  Revision 1.217  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)
 
 

+ 6 - 2
compiler/symconst.pas

@@ -247,7 +247,8 @@ type
     po_nostackframe,
     po_nostackframe,
     po_has_mangledname,
     po_has_mangledname,
     po_has_public_name,
     po_has_public_name,
-    po_forward
+    po_forward,
+    po_global
   );
   );
   tprocoptions=set of tprocoption;
   tprocoptions=set of tprocoption;
 
 
@@ -427,7 +428,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.94  2004-11-17 22:21:35  peter
+  Revision 1.95  2004-11-19 08:17:02  michael
+  * Split po_public into po_public and po_global (Peter)
+
+  Revision 1.94  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)
 
 

+ 8 - 4
compiler/utils/ppudump.pp

@@ -828,7 +828,8 @@ type
     po_nostackframe,
     po_nostackframe,
     po_has_mangledname,
     po_has_mangledname,
     po_has_public_name,
     po_has_public_name,
-    po_forward
+    po_forward,
+    po_global
   );
   );
   tprocoptions=set of tprocoption;
   tprocoptions=set of tprocoption;
 procedure read_abstract_proc_def(var proccalloption:tproccalloption;var procoptions:tprocoptions);
 procedure read_abstract_proc_def(var proccalloption:tproccalloption;var procoptions:tprocoptions);
@@ -896,7 +897,8 @@ const
      (mask:po_nostackframe;    str:'NoStackFrame'),
      (mask:po_nostackframe;    str:'NoStackFrame'),
      (mask:po_has_mangledname; str:'HasMangledName'),
      (mask:po_has_mangledname; str:'HasMangledName'),
      (mask:po_has_public_name; str:'HasPublicName'),
      (mask:po_has_public_name; str:'HasPublicName'),
-     (mask:po_forward;         str:'Forward')
+     (mask:po_forward;         str:'Forward'),
+     (mask:po_global;          str:'Global')
   );
   );
 var
 var
   proctypeoption  : tproctypeoption;
   proctypeoption  : tproctypeoption;
@@ -1442,7 +1444,6 @@ begin
              read_abstract_proc_def(calloption,procoptions);
              read_abstract_proc_def(calloption,procoptions);
              if (po_has_mangledname in procoptions) then
              if (po_has_mangledname in procoptions) then
                writeln(space,'     Mangled name : ',getstring);
                writeln(space,'     Mangled name : ',getstring);
-             writeln(space,'  Overload Number : ',getword);
              writeln(space,'           Number : ',getword);
              writeln(space,'           Number : ',getword);
              writeln(space,'            Level : ',getbyte);
              writeln(space,'            Level : ',getbyte);
              write  (space,'            Class : ');
              write  (space,'            Class : ');
@@ -2087,7 +2088,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.61  2004-11-17 22:22:12  peter
+  Revision 1.62  2004-11-19 08:17:02  michael
+  * Split po_public into po_public and po_global (Peter)
+
+  Revision 1.61  2004/11/17 22:22:12  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)