Bläddra i källkod

* renamed cchartype to cansichartype

git-svn-id: branches/jvmbackend@18779 -
Jonas Maebe 14 år sedan
förälder
incheckning
67c2c7c166

+ 6 - 6
compiler/dbgdwarf.pas

@@ -1789,7 +1789,7 @@ implementation
             DW_AT_byte_size,DW_FORM_udata,def.size,
             DW_AT_byte_stride,DW_FORM_udata,1
             ]);
-          append_labelentry_ref(DW_AT_type,def_dwarf_lab(cchartype));
+          append_labelentry_ref(DW_AT_type,def_dwarf_lab(cansichartype));
           finish_entry;
           append_entry(DW_TAG_subrange_type,false,[
             DW_AT_lower_bound,DW_FORM_udata,0,
@@ -1831,7 +1831,7 @@ implementation
            begin
              { looks like a pchar }
              append_entry(DW_TAG_pointer_type,false,[]);
-             append_labelentry_ref(DW_AT_type,def_dwarf_lab(cchartype));
+             append_labelentry_ref(DW_AT_type,def_dwarf_lab(cansichartype));
              finish_entry;
            end;
          st_unicodestring,
@@ -3814,19 +3814,19 @@ implementation
         case def.stringtype of
           st_shortstring:
             begin
-              addstringdef('ShortString',cchartype,false,1);
+              addstringdef('ShortString',cansichartype,false,1);
             end;
           st_longstring:
             begin
 {$ifdef cpu64bitaddr}
-              addstringdef('LongString',cchartype,false,8);
+              addstringdef('LongString',cansichartype,false,8);
 {$else cpu64bitaddr}
-              addstringdef('LongString',cchartype,false,4);
+              addstringdef('LongString',cansichartype,false,4);
 {$endif cpu64bitaddr}
            end;
          st_ansistring:
            begin
-             addstringdef('AnsiString',cchartype,true,-1);
+             addstringdef('AnsiString',cansichartype,true,-1);
            end;
          st_unicodestring:
            begin

+ 7 - 7
compiler/dbgstabs.pas

@@ -545,14 +545,14 @@ implementation
               slen:=def.len;
               if slen=0 then
                 slen:=255;
-              charst:=def_stab_number(cchartype);
+              charst:=def_stab_number(cansichartype);
               bytest:=def_stab_number(u8inttype);
               ss:=def_stabstr_evaluate(def,'s$1length:$2,0,8;st:ar$2;1;$3;$4,8,$5;;',
                           [tostr(slen+1),bytest,tostr(slen),charst,tostr(slen*8)]);
             end;
           st_longstring:
             begin
-              charst:=def_stab_number(cchartype);
+              charst:=def_stab_number(cansichartype);
               bytest:=def_stab_number(u8inttype);
               longst:=def_stab_number(u32inttype);
               ss:=def_stabstr_evaluate(def,'s$1length:$2,0,32;dummy:$6,32,8;st:ar$2;1;$3;$4,40,$5;;',
@@ -561,7 +561,7 @@ implementation
          st_ansistring:
            begin
              { looks like a pchar }
-             ss:='*'+def_stab_number(cchartype);
+             ss:='*'+def_stab_number(cansichartype);
            end;
          st_unicodestring,
          st_widestring:
@@ -704,13 +704,13 @@ implementation
                                  'NAME:ar$1;0;255;$4,512,2048;;',[def_stab_number(s32inttype),
                                  def_stab_number(s64inttype),
                                  def_stab_number(u8inttype),
-                                 def_stab_number(cchartype)]);
+                                 def_stab_number(cansichartype)]);
 {$else cpu64bitaddr}
         ss:=def_stabstr_evaluate(def,'s${savesize}HANDLE:$1,0,32;MODE:$1,32,32;RECSIZE:$1,64,32;'+
                                  '_PRIVATE:ar$1;1;32;$3,96,256;USERDATA:ar$1;1;16;$2,352,128;'+
                                  'NAME:ar$1;0;255;$3,480,2048;;',[def_stab_number(s32inttype),
                                  def_stab_number(u8inttype),
-                                 def_stab_number(cchartype)]);
+                                 def_stab_number(cansichartype)]);
 {$endif cpu64bitaddr}
         write_def_stabstr(list,def,ss);
       end;
@@ -922,7 +922,7 @@ implementation
                 appenddef(list,cwidechartype)
               else
                 begin
-                  appenddef(list,cchartype);
+                  appenddef(list,cansichartype);
                   appenddef(list,u8inttype);
                 end;
             end;
@@ -935,7 +935,7 @@ implementation
               appenddef(list,s64inttype);
 {$endif cpu64bitaddr}
               appenddef(list,u8inttype);
-              appenddef(list,cchartype);
+              appenddef(list,cansichartype);
             end;
           classrefdef :
             appenddef(list,pvmttype);

+ 1 - 1
compiler/jvm/njvmld.pas

@@ -100,7 +100,7 @@ function tjvmassignmentnode.pass_1: tnode;
         { prevent errors in case of an expression such as
             byte(str[x]):=12;
         }
-        inserttypeconv_explicit(right,cchartype);
+        inserttypeconv_explicit(right,cansichartype);
         { call ShortstringClass(@shortstring).setChar(index,char) }
         tvecnode(target).left:=caddrnode.create_internal(tvecnode(target).left);
         { avoid useless typecheck when casting to shortstringclass }

+ 6 - 6
compiler/ncnv.pas

@@ -502,9 +502,9 @@ implementation
                       { widechars are not yet supported }
                       if is_widechar(p2.resultdef) then
                         begin
-                          inserttypeconv(p2,cchartype);
+                          inserttypeconv(p2,cansichartype);
                           if (p2.nodetype<>ordconstn) then
-                            incompatibletypes(cwidechartype,cchartype);
+                            incompatibletypes(cwidechartype,cansichartype);
                         end;
 
                       getrange(p2.resultdef,lr,hr);
@@ -512,11 +512,11 @@ implementation
                        begin
                          if is_widechar(p3.resultdef) then
                            begin
-                             inserttypeconv(p3,cchartype);
+                             inserttypeconv(p3,cansichartype);
                              if (p3.nodetype<>ordconstn) then
                                begin
                                  current_filepos:=p3.fileinfo;
-                                 incompatibletypes(cwidechartype,cchartype);
+                                 incompatibletypes(cwidechartype,cansichartype);
                                end;
                            end;
                          { this isn't good, you'll get problems with
@@ -609,7 +609,7 @@ implementation
                          for l:=1 to length(pshortstring(tstringconstnode(p2).value_str)^) do
                           do_set(ord(pshortstring(tstringconstnode(p2).value_str)^[l]));
                         if hdef=nil then
-                         hdef:=cchartype;
+                         hdef:=cansichartype;
                         p2.free;
                       end;
 
@@ -1179,7 +1179,7 @@ implementation
               begin
                 hp:=cordconstnode.create(
                       ord(unicode2asciichar(tcompilerwidechar(tordconstnode(left).value.uvalue))),
-                      cchartype,true);
+                      cansichartype,true);
                 result:=hp;
               end
              else if (torddef(resultdef).ordtype=uwidechar) and

+ 1 - 1
compiler/ncon.pas

@@ -920,7 +920,7 @@ implementation
               else
                 l:=0;
               resultdef:=tarraydef.create(0,l,s32inttype);
-              tarraydef(resultdef).elementdef:=cchartype;
+              tarraydef(resultdef).elementdef:=cansichartype;
               include(tarraydef(resultdef).arrayoptions,ado_IsConstString);
             end;
           cst_shortstring :

+ 3 - 3
compiler/ninl.pas

@@ -503,7 +503,7 @@ implementation
                       { iso pascal needs a different handler }
                       if (m_iso in current_settings.modeswitches) and do_read then
                         name:=name+'_iso';
-                      readfunctype:=cchartype;
+                      readfunctype:=cansichartype;
                     end;
                   uwidechar :
                     begin
@@ -1933,7 +1933,7 @@ implementation
               in_chr_byte:
                 begin
                    { convert to explicit char() }
-                   result:=ctypeconvnode.create_internal(left,cchartype);
+                   result:=ctypeconvnode.create_internal(left,cansichartype);
                    left:=nil;
                 end;
               in_length_x:
@@ -3557,7 +3557,7 @@ implementation
           result:=ccallnode.createintern('fpc_widestr_copy',paras)
         else if is_unicodestring(resultdef) then
           result:=ccallnode.createintern('fpc_unicodestr_copy',paras)
-          { can't check for resultdef = cchartype, because resultdef=
+          { can't check for resultdef = cansichartype, because resultdef=
             cshortstringtype here }
         else if is_char(paradef) then
           result:=ccallnode.createintern('fpc_char_copy',paras)

+ 3 - 3
compiler/nmem.pas

@@ -942,11 +942,11 @@ implementation
                   st_widestring :
                     elementdef:=cwidechartype;
                   st_ansistring :
-                    elementdef:=cchartype;
+                    elementdef:=cansichartype;
                   st_longstring :
-                    elementdef:=cchartype;
+                    elementdef:=cansichartype;
                   st_shortstring :
-                    elementdef:=cchartype;
+                    elementdef:=cansichartype;
                 end;
                 if right.nodetype=rangen then
                   begin

+ 1 - 1
compiler/pexpr.pas

@@ -2616,7 +2616,7 @@ implementation
 
              _CCHAR :
                begin
-                 p1:=cordconstnode.create(ord(pattern[1]),cchartype,true);
+                 p1:=cordconstnode.create(ord(pattern[1]),cansichartype,true);
                  consume(_CCHAR);
                end;
 

+ 6 - 6
compiler/psystem.pas

@@ -162,7 +162,7 @@ implementation
         bool16type:=torddef.create(bool16bit,low(int64),high(int64));
         bool32type:=torddef.create(bool32bit,low(int64),high(int64));
         bool64type:=torddef.create(bool64bit,low(int64),high(int64));
-        cchartype:=torddef.create(uchar,0,255);
+        cansichartype:=torddef.create(uchar,0,255);
         cwidechartype:=torddef.create(uwidechar,0,65535);
         cshortstringtype:=tstringdef.createshort(255);
         { should we give a length to the default long and ansi string definition ?? }
@@ -176,7 +176,7 @@ implementation
         { length=0 for shortstring is open string (needed for readln(string) }
         openshortstringtype:=tstringdef.createshort(0);
         openchararraytype:=tarraydef.create(0,-1,s32inttype);
-        tarraydef(openchararraytype).elementdef:=cchartype;
+        tarraydef(openchararraytype).elementdef:=cansichartype;
 {$ifdef x86}
         create_fpu_types;
         if target_info.system<>system_x86_64_win64 then
@@ -248,7 +248,7 @@ implementation
 {$endif cpu8bitalu}
         { some other definitions }
         voidpointertype:=tpointerdef.create(voidtype);
-        charpointertype:=tpointerdef.create(cchartype);
+        charpointertype:=tpointerdef.create(cansichartype);
         widecharpointertype:=tpointerdef.create(cwidechartype);
         voidfarpointertype:=tpointerdef.createfar(voidtype);
         cfiletype:=tfiledef.createuntyped;
@@ -318,7 +318,7 @@ implementation
         addtype('LongInt',s32inttype);
         addtype('QWord',u64inttype);
         addtype('Int64',s64inttype);
-        addtype('Char',cchartype);
+        addtype('Char',cansichartype);
         addtype('WideChar',cwidechartype);
         addtype('Text',tfiledef.createtext);
         addtype('TypedFile',tfiledef.createtyped(voidtype));
@@ -337,7 +337,7 @@ implementation
         addtype('$longint',s32inttype);
         addtype('$qword',u64inttype);
         addtype('$int64',s64inttype);
-        addtype('$char',cchartype);
+        addtype('$char',cansichartype);
         addtype('$widechar',cwidechartype);
         addtype('$shortstring',cshortstringtype);
         addtype('$longstring',clongstringtype);
@@ -439,7 +439,7 @@ implementation
         loadtype('formal',cformaltype);
         loadtype('typedformal',ctypedformaltype);
         loadtype('void',voidtype);
-        loadtype('char',cchartype);
+        loadtype('char',cansichartype);
         loadtype('widechar',cwidechartype);
         loadtype('shortstring',cshortstringtype);
         loadtype('longstring',clongstringtype);

+ 1 - 1
compiler/symdef.pas

@@ -781,7 +781,7 @@ interface
        cformaltype,               { unique formal definition }
        ctypedformaltype,          { unique typed formal definition }
        voidtype,                  { Void (procedure) }
-       cchartype,                 { Char }
+       cansichartype,             { Char }
        cwidechartype,             { WideChar }
        pasbool8type,              { boolean type }
        pasbool16type,