Bläddra i källkod

* unit names and procedure names are stored mixed case

peter 25 år sedan
förälder
incheckning
eb3ca9c51d

+ 6 - 4
compiler/browcol.pas

@@ -38,7 +38,7 @@ const
   SymbolTypLen : sw_integer = 6;
 
   RecordTypes : set of tsymtyp =
-    ([typesym,unitsym,programsym]);
+    ([typesym,unitsym]);
 
     sfRecord        = $00000001;
     sfObject        = $00000002;
@@ -766,7 +766,6 @@ begin
                    else
                      S:='func';
     unitsym      : S:='unit';
-    programsym   : S:='prog';
     constsym     : S:='const';
     enumsym      : S:='enum';
     typedconstsym: S:='const';
@@ -2094,7 +2093,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.9  2000-09-24 15:06:11  peter
+  Revision 1.10  2000-10-15 07:47:51  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.9  2000/09/24 15:06:11  peter
     * use defines.inc
 
   Revision 1.8  2000/09/11 17:00:22  florian
@@ -2121,4 +2123,4 @@ end.
   Revision 1.2  2000/07/13 11:32:32  michael
   + removed logs
 
-}
+}

+ 20 - 6
compiler/fmodule.pas

@@ -132,6 +132,7 @@ interface
           path,                     { path where the module is find/created }
           outputpath,               { path where the .s / .o / exe are created }
           modulename,               { name of the module in uppercase }
+          realmodulename,           { name of the module in the orignal case }
           objfilename,              { fullname of the objectfile }
           asmfilename,              { fullname of the assemblerfile }
           ppufilename,              { fullname of the ppufile }
@@ -710,13 +711,20 @@ end;
         FSplit(s,p,n,e);
       { Programs have the name program to don't conflict with dup id's }
         if _is_unit then
+         begin
 {$ifdef UNITALIASES}
-          modulename:=stringdup(GetUnitAlias(Upper(n)))
+           modulename:=stringdup(GetUnitAlias(Upper(n)));
+           realmodulename:=stringdup(GetUnitAlias(n));
 {$else}
-          modulename:=stringdup(Upper(n))
+           modulename:=stringdup(Upper(n));
+           realmodulename:=stringdup(n);
 {$endif}
+         end
         else
-          modulename:=stringdup('PROGRAM');
+         begin
+           modulename:=stringdup('PROGRAM');
+           realmodulename:=stringdup('Program');
+         end;
         mainsource:=stringdup(s);
         ppufilename:=nil;
         objfilename:=nil;
@@ -779,7 +787,9 @@ end;
       { search the PPU file if it is an unit }
         if is_unit then
          begin
-           search_unit(modulename^,false);
+           { use the realmodulename so we can also find a case sensitive
+             source filename }
+           search_unit(realmodulename^,false);
            { it the sources_available is changed then we know that
              the sources aren't available }
            if not sources_avail then
@@ -828,6 +838,7 @@ end;
         stringdispose(outputpath);
         stringdispose(path);
         stringdispose(modulename);
+        stringdispose(realmodulename);
         stringdispose(mainsource);
         stringdispose(asmprefix);
         localunitsearchpath.done;
@@ -901,11 +912,14 @@ end;
 end.
 {
   $Log$
-  Revision 1.2  2000-09-24 15:06:16  peter
+  Revision 1.3  2000-10-15 07:47:51  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.2  2000/09/24 15:06:16  peter
     * use defines.inc
 
   Revision 1.1  2000/08/27 16:11:50  peter
     * moved some util functions from globals,cobjects to cutils
     * splitted files into finput,fmodule
 
-}
+}

+ 18 - 18
compiler/pdecsub.pas

@@ -87,9 +87,6 @@ implementation
 {$endif}
        ;
 
-    var
-      realname : string;  { contains the real name of a procedure as it's typed }
-
 
     procedure parameter_dec(aktprocdef:pabstractprocdef);
       {
@@ -313,7 +310,7 @@ implementation
 
 
 procedure parse_proc_head(options:tproctypeoption);
-var sp:stringid;
+var orgsp,sp:stringid;
     pd:Pprocdef;
     paramoffset:longint;
     sym:Psym;
@@ -331,12 +328,12 @@ begin
   if (options=potype_operator) then
     begin
       sp:=overloaded_names[optoken];
-      realname:=sp;
+      orgsp:=sp;
     end
   else
     begin
       sp:=pattern;
-      realname:=orgpattern;
+      orgsp:=orgpattern;
       consume(_ID);
     end;
 
@@ -352,7 +349,7 @@ begin
      tokenpos:=storepos;
      { load proc name }
      sp:=pattern;
-     realname:=orgpattern;
+     orgsp:=orgpattern;
      procstartfilepos:=tokenpos;
      { qualifier is class name ? }
      if (sym^.typ<>typesym) or
@@ -460,7 +457,7 @@ begin
          DuplicateSym(aktprocsym);
         { try to recover by creating a new aktprocsym }
         tokenpos:=procstartfilepos;
-        aktprocsym:=new(pprocsym,init(sp));
+        aktprocsym:=new(pprocsym,init(orgsp));
       end;
    end
   else
@@ -483,7 +480,7 @@ begin
 {$endif DONOTCHAINOPERATORS}
        end
       else
-       aktprocsym:=new(pprocsym,init(sp));
+       aktprocsym:=new(pprocsym,init(orgsp));
      symtablestack^.insert(aktprocsym);
    end;
 
@@ -726,7 +723,7 @@ begin
   { only os/2 needs this }
   if target_info.target=target_i386_os2 then
    begin
-     procnames.insert(realname);
+     procnames.insert(aktprocsym^.realname);
      procinfo^.exported:=true;
      if cs_link_deffile in aktglobalswitches then
        deffile.AddExport(aktprocsym^.definition^.mangledname);
@@ -787,7 +784,7 @@ end;
 
 procedure pd_system(const procnames:Tstringcontainer);
 begin
-  aktprocsym^.definition^.setmangledname(realname);
+  aktprocsym^.definition^.setmangledname(aktprocsym^.realname);
 end;
 
 procedure pd_abstract(const procnames:Tstringcontainer);
@@ -889,7 +886,7 @@ end;
 procedure pd_cdecl(const procnames:Tstringcontainer);
 begin
   if aktprocsym^.definition^.deftype<>procvardef then
-    aktprocsym^.definition^.setmangledname(target_os.Cprefix+realname);
+    aktprocsym^.definition^.setmangledname(target_os.Cprefix+aktprocsym^.realname);
   { do not copy on local !! }
   if (aktprocsym^.definition^.deftype=procdef) and
      assigned(aktprocsym^.definition^.parast) then
@@ -900,7 +897,7 @@ procedure pd_cppdecl(const procnames:Tstringcontainer);
 begin
   if aktprocsym^.definition^.deftype<>procvardef then
     aktprocsym^.definition^.setmangledname(
-      target_os.Cprefix+aktprocsym^.definition^.cplusplusmangledname(realname));
+      target_os.Cprefix+aktprocsym^.definition^.cplusplusmangledname(aktprocsym^.realname));
   { do not copy on local !! }
   if (aktprocsym^.definition^.deftype=procdef) and
      assigned(aktprocsym^.definition^.parast) then
@@ -992,7 +989,7 @@ begin
         else
           Message(parser_w_empty_import_name);}
         { this should work both for win32 and Linux !! PM }
-        import_name:=realname;
+        import_name:=aktprocsym^.realname;
       if not(current_module^.uses_imports) then
        begin
          current_module^.uses_imports:=true;
@@ -1583,7 +1580,7 @@ begin
                    (aktprocsym^.definition^.maxparacount>0)) then
                  begin
                     MessagePos1(aktprocsym^.definition^.fileinfo,parser_e_header_dont_match_forward,
-                                aktprocsym^.demangledName);
+                                aktprocsym^.declarationstr);
                     exit;
                  end;
                if hd^.forwarddef then
@@ -1596,7 +1593,7 @@ begin
                       (m_repeat_forward in aktmodeswitches)) then
                      begin
                        MessagePos1(aktprocsym^.definition^.fileinfo,parser_e_header_dont_match_forward,
-                                   aktprocsym^.demangledName);
+                                   aktprocsym^.declarationstr);
                        exit;
                      end;
                    { Check calling convention, no check for internconst,internproc which
@@ -1651,7 +1648,7 @@ begin
                          if hd^.forwarddef and aktprocsym^.definition^.forwarddef then
                            begin
                              MessagePos1(aktprocsym^.definition^.fileinfo,
-                                         parser_e_function_already_declared_public_forward,aktprocsym^.demangledName);
+                                         parser_e_function_already_declared_public_forward,aktprocsym^.declarationstr);
                              check_identical_proc:=true;
                            { Remove other forward from the list to reduce errors }
                              pd^.nextoverloaded:=pd^.nextoverloaded^.nextoverloaded;
@@ -1817,7 +1814,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.1  2000-10-14 10:14:51  peter
+  Revision 1.2  2000-10-15 07:47:51  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.1  2000/10/14 10:14:51  peter
     * moehrendorf oct 2000 rewrite
 
 }

+ 34 - 37
compiler/pmodules.pas

@@ -641,7 +641,7 @@ implementation
         symtablestack:=systemunit;
         { add to the used units }
         current_module^.used_units.concat(new(pused_unit,init(hp,true)));
-        unitsym:=new(punitsym,init('SYSTEM',systemunit));
+        unitsym:=new(punitsym,init('System',systemunit));
         inc(unitsym^.refs);
         refsymtable^.insert(unitsym);
         { read default constant definitions }
@@ -660,24 +660,24 @@ implementation
       { Objpas unit? }
         if m_objpas in aktmodeswitches then
          begin
-           hp:=loadunit('OBJPAS',false);
+           hp:=loadunit('ObjPas',false);
            psymtable(hp^.globalsymtable)^.next:=symtablestack;
            symtablestack:=hp^.globalsymtable;
            { add to the used units }
            current_module^.used_units.concat(new(pused_unit,init(hp,true)));
-           unitsym:=new(punitsym,init('OBJPAS',hp^.globalsymtable));
+           unitsym:=new(punitsym,init('ObjPas',hp^.globalsymtable));
            inc(unitsym^.refs);
            refsymtable^.insert(unitsym);
          end;
       { Profile unit? Needed for go32v2 only }
         if (cs_profile in aktmoduleswitches) and (target_info.target=target_i386_go32v2) then
          begin
-           hp:=loadunit('PROFILE',false);
+           hp:=loadunit('Profile',false);
            psymtable(hp^.globalsymtable)^.next:=symtablestack;
            symtablestack:=hp^.globalsymtable;
            { add to the used units }
            current_module^.used_units.concat(new(pused_unit,init(hp,true)));
-           unitsym:=new(punitsym,init('PROFILE',hp^.globalsymtable));
+           unitsym:=new(punitsym,init('Profile',hp^.globalsymtable));
            inc(unitsym^.refs);
            refsymtable^.insert(unitsym);
          end;
@@ -687,24 +687,24 @@ implementation
            { Heaptrc unit }
            if (cs_gdb_heaptrc in aktglobalswitches) then
             begin
-              hp:=loadunit('HEAPTRC',false);
+              hp:=loadunit('HeapTrc',false);
               psymtable(hp^.globalsymtable)^.next:=symtablestack;
               symtablestack:=hp^.globalsymtable;
               { add to the used units }
               current_module^.used_units.concat(new(pused_unit,init(hp,true)));
-              unitsym:=new(punitsym,init('HEAPTRC',hp^.globalsymtable));
+              unitsym:=new(punitsym,init('HeapTrc',hp^.globalsymtable));
               inc(unitsym^.refs);
               refsymtable^.insert(unitsym);
             end;
            { Lineinfo unit }
            if (cs_gdb_lineinfo in aktglobalswitches) then
             begin
-              hp:=loadunit('LINEINFO',false);
+              hp:=loadunit('LineInfo',false);
               psymtable(hp^.globalsymtable)^.next:=symtablestack;
               symtablestack:=hp^.globalsymtable;
               { add to the used units }
               current_module^.used_units.concat(new(pused_unit,init(hp,true)));
-              unitsym:=new(punitsym,init('LINEINFO',hp^.globalsymtable));
+              unitsym:=new(punitsym,init('LineInfo',hp^.globalsymtable));
               inc(unitsym^.refs);
               refsymtable^.insert(unitsym);
             end;
@@ -984,9 +984,7 @@ implementation
 {$ifdef GDB}
          pu     : pused_unit;
 {$endif GDB}
-{$ifndef Dont_use_double_checksum}
-        store_crc,store_interface_crc : longint;
-{$endif}
+         store_crc,store_interface_crc : longint;
          s1,s2  : ^string; {Saves stack space}
          force_init_final : boolean;
 
@@ -1003,7 +1001,9 @@ implementation
              current_module^.SetFileName(main_file^.path^+main_file^.name^,true);
 
              stringdispose(current_module^.modulename);
-             current_module^.modulename:=stringdup(upper(pattern));
+             stringdispose(current_module^.realmodulename);
+             current_module^.modulename:=stringdup(pattern);
+             current_module^.realmodulename:=stringdup(orgpattern);
           { check for system unit }
              new(s1);
              new(s2);
@@ -1014,7 +1014,7 @@ implementation
                 if ((length(current_module^.modulename^)>8) or
                    (current_module^.modulename^<>s1^) or
                    (current_module^.modulename^<>s2^)) then
-                  Message1(unit_e_illegal_unit_name,current_module^.modulename^);
+                  Message1(unit_e_illegal_unit_name,current_module^.realmodulename^);
               end
              else
               begin
@@ -1022,7 +1022,7 @@ implementation
                    not((current_module^.modulename^=s2^) or
                        ((length(current_module^.modulename^)>8) and
                         (copy(current_module^.modulename^,1,8)=s2^))) then
-                 Message1(unit_e_illegal_unit_name,current_module^.modulename^);
+                 Message1(unit_e_illegal_unit_name,current_module^.realmodulename^);
                 if (current_module^.modulename^=s1^) then
                  Message(unit_w_switch_us_missed);
               end;
@@ -1039,10 +1039,10 @@ implementation
          { handle the global switches }
          setupglobalswitches;
 
-         Message1(unit_u_start_parse_interface,current_module^.modulename^);
+         Message1(unit_u_start_parse_interface,current_module^.realmodulename^);
 
          { update status }
-         status.currentmodule:=current_module^.modulename^;
+         status.currentmodule:=current_module^.realmodulename^;
 
          { maybe turn off m_objpas if we are compiling objpas }
          if (current_module^.modulename^='OBJPAS') then
@@ -1068,7 +1068,7 @@ implementation
          { inside the unit itself (PM)                }
          { this also forbids to have another symbol      }
          { with the same name as the unit                  }
-         refsymtable^.insert(new(punitsym,init(current_module^.modulename^,unitst)));
+         refsymtable^.insert(new(punitsym,init(current_module^.realmodulename^,unitst)));
 
          { a unit compiled at command line must be inside the loaded_unit list }
          if (compile_level=1) then
@@ -1125,7 +1125,7 @@ implementation
          numberunits;
 
          { ... parse the declarations }
-         Message1(parser_u_parsing_interface,current_module^.modulename^);
+         Message1(parser_u_parsing_interface,current_module^.realmodulename^);
          read_interface_declarations;
 
          { leave when we got an error }
@@ -1142,11 +1142,9 @@ implementation
          write_gdb_info;
 {$endIf Def New_GDB}
 
-  {$ifndef Dont_use_double_checksum}
          if not(cs_compilesystem in aktmoduleswitches) then
            if (Errorcount=0) then
              writeunitas(current_module^.ppufilename^,punitsymtable(symtablestack),true);
-  {$endif Test_Double_checksum}
 
          { Parse the implementation section }
          consume(_IMPLEMENTATION);
@@ -1208,7 +1206,7 @@ implementation
          allow_special:=false;
 {$endif Splitheap}
 
-         Message1(parser_u_parsing_implementation,current_module^.modulename^);
+         Message1(parser_u_parsing_implementation,current_module^.realmodulename^);
 
          { Compile the unit }
          codegen_newprocedure;
@@ -1373,27 +1371,23 @@ implementation
          if cs_local_browser in aktmoduleswitches then
            current_module^.localsymtable:=refsymtable;
          { Write out the ppufile }
-  {$ifndef Dont_use_double_checksum}
-        store_interface_crc:=current_module^.interface_crc;
-        store_crc:=current_module^.crc;
-  {$endif Test_Double_checksum}
+         store_interface_crc:=current_module^.interface_crc;
+         store_crc:=current_module^.crc;
          if (Errorcount=0) then
            writeunitas(current_module^.ppufilename^,punitsymtable(symtablestack),false);
 
-  {$ifndef Dont_use_double_checksum}
          if not(cs_compilesystem in aktmoduleswitches) then
            if store_interface_crc<>current_module^.interface_crc then
              Comment(V_Warning,current_module^.ppufilename^+' Interface CRC changed '+
                tostr(store_crc)+'<>'+tostr(current_module^.interface_crc));
-  {$ifdef EXTDEBUG}
+{$ifdef EXTDEBUG}
          if not(cs_compilesystem in aktmoduleswitches) then
            if (store_crc<>current_module^.crc) and simplify_ppu then
              Comment(V_Warning,current_module^.ppufilename^+' implementation CRC changed '+
                tostr(store_crc)+'<>'+tostr(current_module^.interface_crc));
-  {$endif EXTDEBUG}
-  {$endif ndef Dont_use_Double_checksum}
-          { must be done only after local symtable ref stores !! }
-          closecurrentppu;
+{$endif EXTDEBUG}
+         { must be done only after local symtable ref stores !! }
+         closecurrentppu;
 {$ifdef GDB}
          pu:=pused_unit(usedunits.first);
          while assigned(pu) do
@@ -1411,7 +1405,6 @@ implementation
               current_module^.localsymtable:=nil;
            end;
 
-
          RestoreUnitSyms;
 
          if is_assembler_generated then
@@ -1486,7 +1479,9 @@ implementation
             begin
               consume(_PROGRAM);
               stringdispose(current_module^.modulename);
+              stringdispose(current_module^.realmodulename);
               current_module^.modulename:=stringdup(pattern);
+              current_module^.realmodulename:=stringdup(orgpattern);
               if (target_info.target=target_i386_WIN32) then
                 exportlib^.preparelib(pattern);
               consume(_ID);
@@ -1541,9 +1536,8 @@ implementation
          numberunits;
 
          {Insert the name of the main program into the symbol table.}
-         if current_module^.modulename^<>'' then
-           {st^.insert(new(pprogramsym,init(current_module^.modulename^)));}
-           st^.insert(new(punitsym,init(current_module^.modulename^,punitsymtable(st))));
+         if current_module^.realmodulename^<>'' then
+           st^.insert(new(punitsym,init(current_module^.realmodulename^,punitsymtable(st))));
 
          { ...is also constsymtable, this is the symtable where }
          { the elements of enumeration types are inserted       }
@@ -1714,7 +1708,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.13  2000-10-04 14:51:08  pierre
+  Revision 1.14  2000-10-15 07:47:51  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.13  2000/10/04 14:51:08  pierre
    * IsExe restored
 
   Revision 1.12  2000/09/30 16:07:40  peter

+ 8 - 5
compiler/psub.pas

@@ -626,7 +626,7 @@ implementation
            { A method must be forward defined (in the object declaration) }
              if assigned(procinfo^._class) and (not assigned(oldprocinfo^._class)) then
               begin
-                Message1(parser_e_header_dont_match_any_member,aktprocsym^.demangledName);
+                Message1(parser_e_header_dont_match_any_member,aktprocsym^.declarationstr);
                 aktprocsym^.write_parameter_lists(aktprocsym^.definition);
               end
              else
@@ -639,7 +639,7 @@ implementation
                    aktprocsym^.definition^.nextoverloaded^.interfacedef and
                    not(assigned(aktprocsym^.definition^.nextoverloaded^.nextoverloaded)) then
                  begin
-                   Message1(parser_e_header_dont_match_forward,aktprocsym^.demangledName);
+                   Message1(parser_e_header_dont_match_forward,aktprocsym^.declarationstr);
                    aktprocsym^.write_parameter_lists(aktprocsym^.definition);
                  end
                 else
@@ -686,7 +686,7 @@ implementation
       { compile procedure when a body is needed }
          if (pdflags and pd_body)<>0 then
            begin
-             Message1(parser_p_procedure_start,aktprocsym^.demangledname);
+             Message1(parser_p_procedure_start,aktprocsym^.declarationstr);
              names^.insert(aktprocsym^.definition^.mangledname);
             { set _FAIL as keyword if constructor }
             if (aktprocsym^.definition^.proctypeoption=potype_constructor) then
@@ -828,7 +828,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.16  2000-10-14 10:14:52  peter
+  Revision 1.17  2000-10-15 07:47:51  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.16  2000/10/14 10:14:52  peter
     * moehrendorf oct 2000 rewrite
 
   Revision 1.15  2000/09/24 21:33:47  peter
@@ -879,4 +882,4 @@ end.
 
   Revision 1.2  2000/07/13 11:32:46  michael
   + removed logs
-}
+}

+ 6 - 3
compiler/symconst.pas

@@ -231,7 +231,7 @@ type
               classrefdef,forwarddef);
 
   { possible types for symtable entries }
-  tsymtyp = (abstractsym,varsym,typesym,procsym,unitsym,programsym,
+  tsymtyp = (abstractsym,varsym,typesym,procsym,unitsym,
              constsym,enumsym,typedconstsym,errorsym,syssym,
              labelsym,absolutesym,propertysym,funcretsym,
              macrosym);
@@ -271,7 +271,7 @@ const
 
 const
      SymTypeName : array[tsymtyp] of string[12] =
-     ('abstractsym','variable','type','proc','unit','program',
+     ('abstractsym','variable','type','proc','unit',
       'const','enum','typed const','errorsym','system sym',
       'label','absolute','property','funcret',
       'macrosym');
@@ -281,7 +281,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.8  2000-10-14 10:14:52  peter
+  Revision 1.9  2000-10-15 07:47:52  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.8  2000/10/14 10:14:52  peter
     * moehrendorf oct 2000 rewrite
 
   Revision 1.7  2000/09/24 15:06:28  peter

+ 8 - 8
compiler/symdef.inc

@@ -3056,6 +3056,7 @@ Const local_symtable_index : longint = $8001;
       end;
 
 
+{$ifdef dummy}
     function tprocdef.procname: string;
       var
         s : string;
@@ -3082,6 +3083,7 @@ Const local_symtable_index : longint = $8001;
          else
           procname:=Copy(s,1,l-1);
       end;
+{$endif}
 
     function tprocdef.cplusplusmangledname(const rn : string) : string;
 
@@ -4252,13 +4254,8 @@ Const local_symtable_index : longint = $8001;
          rttilist^.concat(new(pai_const,init_16bit(count)));
 
          { write unit name }
-         if assigned(owner^.name) then
-           begin
-              rttilist^.concat(new(pai_const,init_8bit(length(owner^.name^))));
-              rttilist^.concat(new(pai_string,init(owner^.name^)));
-           end
-         else
-           rttilist^.concat(new(pai_const,init_8bit(0)));
+         rttilist^.concat(new(pai_const,init_8bit(length(current_module^.realmodulename^))));
+         rttilist^.concat(new(pai_string,init(current_module^.realmodulename^)));
 
          { write published properties count }
          count:=0;
@@ -4342,7 +4339,10 @@ Const local_symtable_index : longint = $8001;
 
 {
   $Log$
-  Revision 1.22  2000-10-14 10:14:52  peter
+  Revision 1.23  2000-10-15 07:47:52  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.22  2000/10/14 10:14:52  peter
     * moehrendorf oct 2000 rewrite
 
   Revision 1.21  2000/10/04 23:16:48  pierre

+ 6 - 1
compiler/symdefh.inc

@@ -461,7 +461,9 @@
           procedure setmangledname(const s : string);
           procedure load_references;
           function  write_references : boolean;
+{$ifdef dummy}
           function  procname: string;
+{$endif dummy}
           function  cplusplusmangledname(const rn : string) : string;
           { debug }
 {$ifdef GDB}
@@ -557,7 +559,10 @@
 
 {
   $Log$
-  Revision 1.11  2000-10-14 10:14:53  peter
+  Revision 1.12  2000-10-15 07:47:52  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.11  2000/10/14 10:14:53  peter
     * moehrendorf oct 2000 rewrite
 
   Revision 1.10  2000/09/24 15:06:29  peter

+ 12 - 7
compiler/symppu.inc

@@ -694,7 +694,7 @@
     procedure load_interface;
       var
         b : byte;
-        newmodulename : pstring;
+        newmodulename : string;
       begin
        { read interface part }
          repeat
@@ -702,11 +702,13 @@
            case b of
              ibmodulename :
                begin
-                 newmodulename:=stringdup(current_ppu^.getstring);
-                 if newmodulename^<>current_module^.modulename^ then
-                   Message2(unit_f_unit_name_error,current_module^.modulename^,newmodulename^);
+                 newmodulename:=current_ppu^.getstring;
+                 if upper(newmodulename)<>current_module^.modulename^ then
+                   Message2(unit_f_unit_name_error,current_module^.realmodulename^,newmodulename);
                  stringdispose(current_module^.modulename);
-                 current_module^.modulename:=newmodulename;
+                 stringdispose(current_module^.realmodulename);
+                 current_module^.modulename:=stringdup(upper(newmodulename));
+                 current_module^.realmodulename:=stringdup(newmodulename);
                end;
              ibsourcefiles :
                readsourcefiles;
@@ -736,7 +738,10 @@
 
 {
   $Log$
-  Revision 1.4  2000-09-24 21:33:47  peter
+  Revision 1.5  2000-10-15 07:47:53  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.4  2000/09/24 21:33:47  peter
     * message updates merges
 
   Revision 1.3  2000/09/21 20:56:19  pierre
@@ -745,4 +750,4 @@
   Revision 1.2  2000/07/13 11:32:49  michael
   + removed logs
 
-}
+}

+ 9 - 16
compiler/symsym.inc

@@ -394,9 +394,9 @@
       end;
 
 
-    function tprocsym.demangledname:string;
+    function tprocsym.declarationstr:string;
       begin
-        demangledname:=name+definition^.demangled_paras;
+        declarationstr:=realname+definition^.demangled_paras;
       end;
 
 
@@ -424,9 +424,9 @@
               if pd^.forwarddef then
                 begin
                    if assigned(pd^._class) then
-                     MessagePos1(fileinfo,sym_e_forward_not_resolved,pd^._class^.objname^+'.'+demangledname)
+                     MessagePos1(fileinfo,sym_e_forward_not_resolved,pd^._class^.objname^+'.'+declarationstr)
                    else
-                     MessagePos1(fileinfo,sym_e_forward_not_resolved,demangledname);
+                     MessagePos1(fileinfo,sym_e_forward_not_resolved,declarationstr);
                    { Turn futher error messages off }
                    pd^.forwarddef:=false;
                 end;
@@ -641,16 +641,6 @@
 {$endif GDB}
 
 
-{****************************************************************************
-                                  TPROGRAMSYM
-****************************************************************************}
-
-    constructor tprogramsym.init(const n : string);
-      begin
-        inherited init(n);
-        typ:=programsym;
-      end;
-
 {****************************************************************************
                                   TERRORSYM
 ****************************************************************************}
@@ -2218,7 +2208,10 @@
 
 {
   $Log$
-  Revision 1.9  2000-09-24 21:19:52  peter
+  Revision 1.10  2000-10-15 07:47:53  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.9  2000/09/24 21:19:52  peter
     * delphi compile fixes
 
   Revision 1.8  2000/09/19 23:08:03  pierre
@@ -2246,4 +2239,4 @@
   Revision 1.2  2000/07/13 11:32:49  michael
   + removed logs
 
-}
+}

+ 5 - 7
compiler/symsymh.inc

@@ -112,7 +112,7 @@
           constructor load;
           destructor done;virtual;
           function mangledname : string;virtual;
-          function demangledname:string;
+          function declarationstr:string;
           { writes all declarations }
           procedure write_parameter_lists(skipdef:pprocdef);
           { tests, if all procedures definitions are defined and not }
@@ -302,11 +302,6 @@
 {$endif GDB}
        end;
 
-       pprogramsym = ^tprogramsym;
-       tprogramsym = object(tsym)
-          constructor init(const n : string);
-       end;
-
        psyssym = ^tsyssym;
        tsyssym = object(tsym)
           number : longint;
@@ -321,7 +316,10 @@
 
 {
   $Log$
-  Revision 1.5  2000-08-27 20:19:40  peter
+  Revision 1.6  2000-10-15 07:47:53  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.5  2000/08/27 20:19:40  peter
     * store strings with case in ppu, when an internal symbol is created
       a '$' is prefixed so it's not automatic uppercased
 

+ 5 - 2
compiler/symtable.pas

@@ -2385,7 +2385,7 @@ implementation
          pu        : pused_unit;
       begin
       { first the unitname }
-        current_ppu^.putstring(name^);
+        current_ppu^.putstring(current_module^.realmodulename^);
         current_ppu^.writeentry(ibmodulename);
 
         writesourcefiles;
@@ -2880,7 +2880,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.10  2000-10-14 10:14:53  peter
+  Revision 1.11  2000-10-15 07:47:53  peter
+    * unit names and procedure names are stored mixed case
+
+  Revision 1.10  2000/10/14 10:14:53  peter
     * moehrendorf oct 2000 rewrite
 
   Revision 1.9  2000/10/01 19:48:25  peter