Răsfoiți Sursa

compiler: use sp_internal instead of vo_is_internal for internal symbols used for static fields, remove vo_is_internal

git-svn-id: trunk@14631 -
paul 15 ani în urmă
părinte
comite
77a2c316dd

+ 2 - 1
compiler/pdecvar.pas

@@ -1485,7 +1485,8 @@ implementation
                        fieldvs:=tfieldvarsym(sc[i]);
                        include(fieldvs.symoptions,sp_static);
                        { generate the symbol which reserves the space }
-                       hstaticvs:=tstaticvarsym.create('$_static_'+lower(symtablestack.top.name^)+'_'+fieldvs.name,vs_value,hdef,[vo_is_internal]);
+                       hstaticvs:=tstaticvarsym.create('$_static_'+lower(symtablestack.top.name^)+'_'+fieldvs.name,vs_value,hdef,[]);
+                       include(hstaticvs.symoptions,sp_internal);
                        recst.defowner.owner.insert(hstaticvs);
                        insertbssdata(hstaticvs);
                        { generate the symbol for the access }

+ 0 - 2
compiler/pexpr.pas

@@ -1317,14 +1317,12 @@ implementation
 
        procedure factor_read_id(out p1:tnode;var again:boolean);
          var
-           pc    : pchar;
            srsym : tsym;
            unit_found : boolean;
            srsymtable : TSymtable;
            hdef  : tdef;
            orgstoredpattern,
            storedpattern : string;
-           len   : longint;
            t : ttoken;
          begin
            { allow post fix operators }

+ 1 - 1
compiler/ppu.pas

@@ -43,7 +43,7 @@ type
 {$endif Test_Double_checksum}
 
 const
-  CurrentPPUVersion = 111;
+  CurrentPPUVersion = 112;
 
 { buffer sizes }
   maxentrysize = 1024;

+ 1 - 3
compiler/symconst.pas

@@ -397,9 +397,7 @@ type
     { Objective-C message selector parameter }
     vo_is_msgsel,
     { first field of a record or variant part of a record }
-    vo_is_first_field,
-    { symbols which inserts compiler for special use. they don't generate notes }
-    vo_is_internal
+    vo_is_first_field
   );
   tvaroptions=set of tvaroption;
 

+ 1 - 4
compiler/symtable.pas

@@ -576,7 +576,7 @@ implementation
             { also don't claim for high param of open parameters (PM) }
             if (Errorcount<>0) or
                ([vo_is_hidden_para,vo_is_funcret] * tabstractvarsym(sym).varoptions = [vo_is_hidden_para]) or
-               (vo_is_internal in tabstractvarsym(sym).varoptions) then
+               (sp_internal in tsym(sym).symoptions) then
               exit;
             if (tstoredsym(sym).refs=0) then
               begin
@@ -615,9 +615,6 @@ implementation
         else if ((tsym(sym).owner.symtabletype in
               [ObjectSymtable,parasymtable,localsymtable,staticsymtable])) then
           begin
-           if (Errorcount<>0) or
-              (sp_internal in tsym(sym).symoptions) then
-             exit;
            { do not claim for inherited private fields !! }
            if (tsym(sym).refs=0) and (tsym(sym).owner.symtabletype=ObjectSymtable) then
              MessagePos2(tsym(sym).fileinfo,sym_n_private_method_not_used,tsym(sym).owner.realname^,tsym(sym).prettyname)

+ 2 - 4
compiler/utils/ppudump.pp

@@ -1301,8 +1301,7 @@ type
     vo_is_typinfo_para,
     vo_is_weak_external,
     vo_is_msgsel,
-    vo_is_first_field,
-    vo_is_internal
+    vo_is_first_field
   );
   tvaroptions=set of tvaroption;
   { register variable }
@@ -1345,8 +1344,7 @@ const
      (mask:vo_is_typinfo_para; str:'TypeInfo'),
      (mask:vo_is_msgsel;str:'MsgSel'),
      (mask:vo_is_weak_external;str:'WeakExternal'),
-     (mask:vo_is_first_field;str:'IsFirstField'),
-     (mask:vo_is_internal;str:'IsInternal')
+     (mask:vo_is_first_field;str:'IsFirstField')
   );
 var
   i : longint;