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 -
This commit is contained in:
paul 2010-01-14 03:50:01 +00:00
parent 2c5ed92a4b
commit 77a2c316dd
6 changed files with 7 additions and 15 deletions

View File

@ -1485,7 +1485,8 @@ implementation
fieldvs:=tfieldvarsym(sc[i]); fieldvs:=tfieldvarsym(sc[i]);
include(fieldvs.symoptions,sp_static); include(fieldvs.symoptions,sp_static);
{ generate the symbol which reserves the space } { 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); recst.defowner.owner.insert(hstaticvs);
insertbssdata(hstaticvs); insertbssdata(hstaticvs);
{ generate the symbol for the access } { generate the symbol for the access }

View File

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

View File

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

View File

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

View File

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

View File

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