From 77a2c316ddc67ac187820dfaa18cdd4ba6597247 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 14 Jan 2010 03:50:01 +0000 Subject: [PATCH] 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 - --- compiler/pdecvar.pas | 3 ++- compiler/pexpr.pas | 2 -- compiler/ppu.pas | 2 +- compiler/symconst.pas | 4 +--- compiler/symtable.pas | 5 +---- compiler/utils/ppudump.pp | 6 ++---- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas index 1a69317142..725bcacad9 100644 --- a/compiler/pdecvar.pas +++ b/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 } diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index 90a7e9936e..9902e5caa5 100644 --- a/compiler/pexpr.pas +++ b/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 } diff --git a/compiler/ppu.pas b/compiler/ppu.pas index 3ac810ec54..a38e1a735e 100644 --- a/compiler/ppu.pas +++ b/compiler/ppu.pas @@ -43,7 +43,7 @@ type {$endif Test_Double_checksum} const - CurrentPPUVersion = 111; + CurrentPPUVersion = 112; { buffer sizes } maxentrysize = 1024; diff --git a/compiler/symconst.pas b/compiler/symconst.pas index ae6b2e64ed..267731c5f8 100644 --- a/compiler/symconst.pas +++ b/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; diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 4aa9a826d2..1575f26835 100644 --- a/compiler/symtable.pas +++ b/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) diff --git a/compiler/utils/ppudump.pp b/compiler/utils/ppudump.pp index c1b9d32349..2708f3b04d 100644 --- a/compiler/utils/ppudump.pp +++ b/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;