Browse Source

* add info that a procedure is local in error messages

peter 20 years ago
parent
commit
4631658576
3 changed files with 22 additions and 4 deletions
  1. 8 1
      compiler/ncnv.pas
  2. 6 2
      compiler/symconst.pas
  3. 8 1
      compiler/symdef.pas

+ 8 - 1
compiler/ncnv.pas

@@ -1195,6 +1195,10 @@ implementation
         if (pd.owner.symtabletype=objectsymtable) then
           include(tprocvardef(resulttype.def).procoptions,po_methodpointer);
 
+        { was it a local procedure? }
+        if (pd.owner.symtabletype=localsymtable) then
+          include(tprocvardef(resulttype.def).procoptions,po_local);
+
         { only need the address of the method? this is needed
           for @tobject.create. In this case there will be a loadn without
           a methodpointer. }
@@ -2579,7 +2583,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.174  2005-01-09 15:04:36  peter
+  Revision 1.175  2005-01-30 11:26:40  peter
+    * add info that a procedure is local in error messages
+
+  Revision 1.174  2005/01/09 15:04:36  peter
     * fix crash with -CR
 
   Revision 1.173  2005/01/07 21:14:21  florian

+ 6 - 2
compiler/symconst.pas

@@ -259,7 +259,8 @@ type
     po_syscall_sysv,
     po_syscall_basesysv,
     po_syscall_sysvbase,
-    po_syscall_r12base
+    po_syscall_r12base,
+    po_local
   );
   tprocoptions=set of tprocoption;
 
@@ -440,7 +441,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.100  2005-01-09 20:24:43  olle
+  Revision 1.101  2005-01-30 11:26:40  peter
+    * add info that a procedure is local in error messages
+
+  Revision 1.100  2005/01/09 20:24:43  olle
     * rework of macro subsystem
     + exportable macros for mode macpas
 

+ 8 - 1
compiler/symdef.pas

@@ -3983,6 +3983,8 @@ implementation
         showhidden:=true;
 {$endif EXTDEBUG}
         s:='';
+        if owner.symtabletype=localsymtable then
+         s:=s+'local ';
         if assigned(_class) then
          begin
            if po_classmethod in procoptions then
@@ -4846,6 +4848,8 @@ implementation
              s := s+'address of'
            else
              s := s+'procedure variable type of';
+         if po_local in procoptions then
+           s := s+' local';
          if assigned(rettype.def) and
             (rettype.def<>voidtype.def) then
            s:=s+' function'+typename_paras(showhidden)+':'+rettype.def.gettypename
@@ -6367,7 +6371,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.291  2005-01-24 22:08:32  peter
+  Revision 1.292  2005-01-30 11:26:40  peter
+    * add info that a procedure is local in error messages
+
+  Revision 1.291  2005/01/24 22:08:32  peter
     * interface wrapper generation moved to cgobj
     * generate interface wrappers after the module is parsed