mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 22:39:11 +02:00
* revert has_localst patch
* replace aktstaticsymtable/aktglobalsymtable with current_module
This commit is contained in:
parent
fab51678da
commit
a939095dbe
@ -911,11 +911,11 @@ uses
|
||||
i : longint;
|
||||
begin
|
||||
{ load local symtable first }
|
||||
if ((flags and uf_local_browser)<>0) then
|
||||
{if ((flags and uf_local_browser)<>0) then
|
||||
begin
|
||||
localsymtable:=tstaticsymtable.create(modulename^);
|
||||
tstaticsymtable(localsymtable).ppuload(ppufile);
|
||||
end;
|
||||
end;}
|
||||
|
||||
{ load browser }
|
||||
if (flags and uf_has_browser)<>0 then
|
||||
@ -988,15 +988,13 @@ uses
|
||||
|
||||
{ generate implementation deref data, the interface deref data is
|
||||
already generated when calculating the interface crc }
|
||||
aktglobalsymtable:=tstoredsymtable(globalsymtable);
|
||||
aktstaticsymtable:=tstoredsymtable(localsymtable);
|
||||
if (cs_compilesystem in aktmoduleswitches) then
|
||||
begin
|
||||
tstoredsymtable(globalsymtable).buildderef;
|
||||
derefdataintflen:=derefdata.size;
|
||||
end;
|
||||
tstoredsymtable(globalsymtable).buildderefimpl;
|
||||
if ((flags and uf_local_browser)<>0) and
|
||||
if {((flags and uf_local_browser)<>0) and}
|
||||
assigned(localsymtable) then
|
||||
begin
|
||||
tstoredsymtable(localsymtable).buildderef;
|
||||
@ -1023,7 +1021,7 @@ uses
|
||||
|
||||
{ write static symtable
|
||||
needed for local debugging of unit functions }
|
||||
if ((flags and uf_local_browser)<>0) and
|
||||
if {((flags and uf_local_browser)<>0) and}
|
||||
assigned(localsymtable) then
|
||||
tstoredsymtable(localsymtable).ppuwrite(ppufile);
|
||||
|
||||
@ -1093,7 +1091,6 @@ uses
|
||||
|
||||
{ deref data of interface that affect the crc }
|
||||
derefdata.reset;
|
||||
aktglobalsymtable:=tstoredsymtable(globalsymtable);
|
||||
tstoredsymtable(globalsymtable).buildderef;
|
||||
derefdataintflen:=derefdata.size;
|
||||
writederefdata;
|
||||
@ -1220,11 +1217,13 @@ uses
|
||||
end;
|
||||
numberunits;
|
||||
|
||||
{ load implementation symtable }
|
||||
localsymtable:=tstaticsymtable.create(modulename^);
|
||||
tstaticsymtable(localsymtable).ppuload(ppufile);
|
||||
|
||||
{ we can now derefence all pointers to the implementation parts }
|
||||
oldobjectlibrary:=objectlibrary;
|
||||
objectlibrary:=librarydata;
|
||||
aktglobalsymtable:=tstoredsymtable(globalsymtable);
|
||||
aktstaticsymtable:=tstoredsymtable(localsymtable);
|
||||
tstoredsymtable(globalsymtable).derefimpl;
|
||||
if assigned(localsymtable) then
|
||||
tstoredsymtable(localsymtable).derefimpl;
|
||||
@ -1309,12 +1308,10 @@ uses
|
||||
if interface_compiled then
|
||||
begin
|
||||
Message1(unit_u_reresolving_unit,modulename^);
|
||||
aktglobalsymtable:=tstoredsymtable(globalsymtable);
|
||||
tstoredsymtable(globalsymtable).deref;
|
||||
tstoredsymtable(globalsymtable).derefimpl;
|
||||
if assigned(localsymtable) then
|
||||
begin
|
||||
aktstaticsymtable:=tstoredsymtable(localsymtable);
|
||||
tstoredsymtable(localsymtable).deref;
|
||||
tstoredsymtable(localsymtable).derefimpl;
|
||||
end;
|
||||
@ -1524,7 +1521,11 @@ uses
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.58 2004-07-06 20:23:25 peter
|
||||
Revision 1.59 2004-07-09 22:17:31 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.58 2004/07/06 20:23:25 peter
|
||||
* remove unused and not loaded units before linking
|
||||
|
||||
Revision 1.57 2004/07/06 19:52:04 peter
|
||||
|
@ -704,8 +704,8 @@ implementation
|
||||
if (procdefcoll^.data.proccalloption<>pd.proccalloption) or
|
||||
(procdefcoll^.data.proctypeoption<>pd.proctypeoption) or
|
||||
((procdefcoll^.data.procoptions-
|
||||
[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public,po_haslocalst,po_reintroduce])<>
|
||||
(pd.procoptions-[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public,po_haslocalst,po_reintroduce])) then
|
||||
[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public,po_reintroduce])<>
|
||||
(pd.procoptions-[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public,po_reintroduce])) then
|
||||
begin
|
||||
MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,pd.fullprocname(false));
|
||||
tprocsym(procdefcoll^.data.procsym).write_parameter_lists(pd);
|
||||
@ -1382,7 +1382,11 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.73 2004-07-06 20:58:50 peter
|
||||
Revision 1.74 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.73 2004/07/06 20:58:50 peter
|
||||
* ignore po_haslocalst
|
||||
|
||||
Revision 1.72 2004/06/29 20:58:46 peter
|
||||
|
@ -938,7 +938,6 @@ implementation
|
||||
if procdef.parast.symtablelevel>=normal_function_level then
|
||||
procdef.localst.free;
|
||||
procdef.localst:=nil;
|
||||
exclude(procdef.procoptions,po_haslocalst);
|
||||
end;
|
||||
|
||||
{ remove code tree, if not inline procedure }
|
||||
@ -1384,7 +1383,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.197 2004-07-06 19:52:04 peter
|
||||
Revision 1.198 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.197 2004/07/06 19:52:04 peter
|
||||
* fix storing of localst in ppu
|
||||
|
||||
Revision 1.196 2004/06/20 08:55:30 florian
|
||||
|
@ -138,8 +138,6 @@ interface
|
||||
symtablestack : tsymtable; { linked list of symtables }
|
||||
|
||||
aktrecordsymtable : tsymtable; { current record symtable }
|
||||
aktstaticsymtable : tsymtable; { current static symtable }
|
||||
aktglobalsymtable : tsymtable; { current global symtable }
|
||||
aktparasymtable : tsymtable; { current proc para symtable }
|
||||
aktlocalsymtable : tsymtable; { current proc local symtable }
|
||||
|
||||
@ -333,7 +331,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2004-06-20 08:55:30 florian
|
||||
Revision 1.22 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.21 2004/06/20 08:55:30 florian
|
||||
* logs truncated
|
||||
|
||||
Revision 1.20 2004/03/02 17:32:12 florian
|
||||
|
@ -235,9 +235,7 @@ type
|
||||
conventions like that one of MorphOS }
|
||||
po_explicitparaloc,
|
||||
{ no stackframe will be generated, used by lowlevel assembler like get_frame }
|
||||
po_nostackframe,
|
||||
{ localst is valid }
|
||||
po_haslocalst
|
||||
po_nostackframe
|
||||
);
|
||||
tprocoptions=set of tprocoption;
|
||||
|
||||
@ -411,7 +409,11 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.85 2004-07-06 19:52:04 peter
|
||||
Revision 1.86 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.85 2004/07/06 19:52:04 peter
|
||||
* fix storing of localst in ppu
|
||||
|
||||
Revision 1.84 2004/06/20 08:55:30 florian
|
||||
|
@ -3697,7 +3697,8 @@ implementation
|
||||
tparasymtable(parast).ppuload(ppufile);
|
||||
parast.defowner:=self;
|
||||
{ load local symtable }
|
||||
if (po_haslocalst in procoptions) then
|
||||
if ((proccalloption=pocall_inline) or
|
||||
((current_module.flags and uf_local_browser)<>0)) then
|
||||
begin
|
||||
localst:=tlocalsymtable.create(level);
|
||||
tlocalsymtable(localst).ppuload(ppufile);
|
||||
@ -3829,7 +3830,9 @@ implementation
|
||||
|
||||
{ save localsymtable for inline procedures or when local
|
||||
browser info is requested, this has no influence on the crc }
|
||||
if (po_haslocalst in procoptions) then
|
||||
if assigned(localst) and
|
||||
((proccalloption=pocall_inline) or
|
||||
((current_module.flags and uf_local_browser)<>0)) then
|
||||
begin
|
||||
oldintfcrc:=ppufile.do_crc;
|
||||
ppufile.do_crc:=false;
|
||||
@ -3851,14 +3854,13 @@ implementation
|
||||
|
||||
|
||||
procedure tprocdef.insert_localst;
|
||||
begin
|
||||
begin
|
||||
localst:=tlocalsymtable.create(parast.symtablelevel);
|
||||
localst.defowner:=self;
|
||||
{ this is used by insert
|
||||
to check same names in parast and localst }
|
||||
localst.next:=parast;
|
||||
include(procoptions,po_haslocalst);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function tprocdef.fullprocname(showhidden:boolean):string;
|
||||
@ -3987,7 +3989,7 @@ implementation
|
||||
if move_last then
|
||||
lastwritten:=lastref;
|
||||
if ((current_module.flags and uf_local_browser)<>0) and
|
||||
(po_haslocalst in procoptions) and
|
||||
assigned(localst) and
|
||||
locals then
|
||||
begin
|
||||
tparasymtable(parast).load_references(ppufile,locals);
|
||||
@ -4047,7 +4049,7 @@ implementation
|
||||
ppufile.writeentry(ibdefref);
|
||||
write_references:=true;
|
||||
if ((current_module.flags and uf_local_browser)<>0) and
|
||||
(po_haslocalst in procoptions) and
|
||||
assigned(localst) and
|
||||
locals then
|
||||
begin
|
||||
pdo:=_class;
|
||||
@ -4195,7 +4197,9 @@ implementation
|
||||
inherited buildderefimpl;
|
||||
|
||||
{ Locals }
|
||||
if (po_haslocalst in procoptions) then
|
||||
if assigned(localst) and
|
||||
((proccalloption=pocall_inline) or
|
||||
((current_module.flags and uf_local_browser)<>0)) then
|
||||
begin
|
||||
tlocalsymtable(localst).buildderef;
|
||||
tlocalsymtable(localst).buildderefimpl;
|
||||
@ -4253,7 +4257,7 @@ implementation
|
||||
aktlocalsymtable:=localst;
|
||||
|
||||
{ Locals }
|
||||
if (po_haslocalst in procoptions) then
|
||||
if assigned(localst) then
|
||||
begin
|
||||
tlocalsymtable(localst).deref;
|
||||
tlocalsymtable(localst).derefimpl;
|
||||
@ -6125,7 +6129,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.244 2004-07-06 19:52:04 peter
|
||||
Revision 1.245 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.244 2004/07/06 19:52:04 peter
|
||||
* fix storing of localst in ppu
|
||||
|
||||
Revision 1.243 2004/06/20 08:55:30 florian
|
||||
|
@ -1414,8 +1414,6 @@ implementation
|
||||
|
||||
procedure tstaticsymtable.ppuload(ppufile:tcompilerppufile);
|
||||
begin
|
||||
aktstaticsymtable:=self;
|
||||
|
||||
next:=symtablestack;
|
||||
symtablestack:=self;
|
||||
|
||||
@ -1431,24 +1429,18 @@ implementation
|
||||
|
||||
procedure tstaticsymtable.ppuwrite(ppufile:tcompilerppufile);
|
||||
begin
|
||||
aktstaticsymtable:=self;
|
||||
|
||||
inherited ppuwrite(ppufile);
|
||||
end;
|
||||
|
||||
|
||||
procedure tstaticsymtable.load_references(ppufile:tcompilerppufile;locals:boolean);
|
||||
begin
|
||||
aktstaticsymtable:=self;
|
||||
|
||||
inherited load_references(ppufile,locals);
|
||||
end;
|
||||
|
||||
|
||||
procedure tstaticsymtable.write_references(ppufile:tcompilerppufile;locals:boolean);
|
||||
begin
|
||||
aktstaticsymtable:=self;
|
||||
|
||||
inherited write_references(ppufile,locals);
|
||||
end;
|
||||
|
||||
@ -1526,8 +1518,6 @@ implementation
|
||||
end;
|
||||
{$endif GDB}
|
||||
|
||||
aktglobalsymtable:=self;
|
||||
|
||||
next:=symtablestack;
|
||||
symtablestack:=self;
|
||||
|
||||
@ -1566,8 +1556,6 @@ implementation
|
||||
|
||||
procedure tglobalsymtable.ppuwrite(ppufile:tcompilerppufile);
|
||||
begin
|
||||
aktglobalsymtable:=self;
|
||||
|
||||
{ write the symtable entries }
|
||||
inherited ppuwrite(ppufile);
|
||||
|
||||
@ -1589,16 +1577,12 @@ implementation
|
||||
|
||||
procedure tglobalsymtable.load_references(ppufile:tcompilerppufile;locals:boolean);
|
||||
begin
|
||||
aktglobalsymtable:=self;
|
||||
|
||||
inherited load_references(ppufile,locals);
|
||||
end;
|
||||
|
||||
|
||||
procedure tglobalsymtable.write_references(ppufile:tcompilerppufile;locals:boolean);
|
||||
begin
|
||||
aktglobalsymtable:=self;
|
||||
|
||||
inherited write_references(ppufile,locals);
|
||||
end;
|
||||
|
||||
@ -2332,7 +2316,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.151 2004-06-23 16:22:45 peter
|
||||
Revision 1.152 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.151 2004/06/23 16:22:45 peter
|
||||
* include unit name in error messages when types are the same
|
||||
|
||||
Revision 1.150 2004/06/20 08:55:30 florian
|
||||
|
@ -867,7 +867,7 @@ implementation
|
||||
staticsymtable :
|
||||
begin
|
||||
{ only references to the current static symtable are allowed }
|
||||
if s.owner<>aktstaticsymtable then
|
||||
if s.owner<>current_module.localsymtable then
|
||||
internalerror(200306233);
|
||||
data[len]:=ord(deref_aktstatic);
|
||||
inc(len);
|
||||
@ -1094,9 +1094,9 @@ implementation
|
||||
deref_aktrecord :
|
||||
st:=aktrecordsymtable;
|
||||
deref_aktstatic :
|
||||
st:=aktstaticsymtable;
|
||||
st:=current_module.localsymtable;
|
||||
deref_aktglobal :
|
||||
st:=aktglobalsymtable;
|
||||
st:=current_module.globalsymtable;
|
||||
deref_aktlocal :
|
||||
st:=aktlocalsymtable;
|
||||
deref_aktpara :
|
||||
@ -1487,7 +1487,11 @@ finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.43 2004-06-20 08:55:30 florian
|
||||
Revision 1.44 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.43 2004/06/20 08:55:30 florian
|
||||
* logs truncated
|
||||
|
||||
Revision 1.42 2004/06/16 20:07:10 florian
|
||||
|
@ -1851,6 +1851,26 @@ begin
|
||||
readsymbols('implementation');
|
||||
end;
|
||||
end;
|
||||
{read the definitions}
|
||||
if (verbose and v_defs)<>0 then
|
||||
begin
|
||||
Writeln;
|
||||
Writeln('Implementation definitions');
|
||||
Writeln('----------------------');
|
||||
readdefinitions('implementation',false);
|
||||
end
|
||||
else
|
||||
ppufile.skipuntilentry(ibenddefs);
|
||||
{read the symbols}
|
||||
if (verbose and v_syms)<>0 then
|
||||
begin
|
||||
Writeln;
|
||||
Writeln('Implementation Symbols');
|
||||
Writeln('------------------');
|
||||
readsymbols('implementation');
|
||||
end
|
||||
else
|
||||
ppufile.skipuntilentry(ibendsyms);
|
||||
{read the browser units stuff}
|
||||
if (ppufile.header.flags and uf_has_browser)<>0 then
|
||||
begin
|
||||
@ -1961,7 +1981,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.51 2004-07-06 19:52:04 peter
|
||||
Revision 1.52 2004-07-09 22:17:32 peter
|
||||
* revert has_localst patch
|
||||
* replace aktstaticsymtable/aktglobalsymtable with current_module
|
||||
|
||||
Revision 1.51 2004/07/06 19:52:04 peter
|
||||
* fix storing of localst in ppu
|
||||
|
||||
Revision 1.50 2003/12/16 21:29:25 florian
|
||||
|
Loading…
Reference in New Issue
Block a user