mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 01:39:26 +02:00
* win32 compilation error fix
+ some work for local browser (not cl=omplete yet)
This commit is contained in:
parent
84a3b7e99d
commit
2541a27a5a
@ -319,13 +319,6 @@ unit pmodules;
|
|||||||
{ load browser info if stored }
|
{ load browser info if stored }
|
||||||
if ((current_module^.flags and uf_has_browser)<>0) then
|
if ((current_module^.flags and uf_has_browser)<>0) then
|
||||||
punitsymtable(current_module^.globalsymtable)^.load_symtable_refs;
|
punitsymtable(current_module^.globalsymtable)^.load_symtable_refs;
|
||||||
if ((current_module^.flags and uf_local_browser)<>0) then
|
|
||||||
begin
|
|
||||||
current_module^.localsymtable:=new(psymtable,loadas(staticsymtable));
|
|
||||||
psymtable(current_module^.localsymtable)^.name:=
|
|
||||||
stringdup('implementation of '+psymtable(current_module^.globalsymtable)^.name^);
|
|
||||||
psymtable(current_module^.localsymtable)^.load_browser;
|
|
||||||
end;
|
|
||||||
{ remove the map, it's not needed anymore }
|
{ remove the map, it's not needed anymore }
|
||||||
dispose(current_module^.map);
|
dispose(current_module^.map);
|
||||||
current_module^.map:=nil;
|
current_module^.map:=nil;
|
||||||
@ -1055,17 +1048,12 @@ unit pmodules;
|
|||||||
if is_assembler_generated then
|
if is_assembler_generated then
|
||||||
insertobjectfile;
|
insertobjectfile;
|
||||||
|
|
||||||
|
if cs_local_browser in aktmoduleswitches then
|
||||||
|
current_module^.localsymtable:=refsymtable;
|
||||||
{ Write out the ppufile }
|
{ Write out the ppufile }
|
||||||
if (status.errorcount=0) then
|
if (status.errorcount=0) then
|
||||||
writeunitas(current_module^.ppufilename^,punitsymtable(symtablestack));
|
writeunitas(current_module^.ppufilename^,punitsymtable(symtablestack));
|
||||||
|
|
||||||
{ write local browser }
|
|
||||||
if cs_local_browser in aktmoduleswitches then
|
|
||||||
begin
|
|
||||||
current_module^.localsymtable:=refsymtable;
|
|
||||||
refsymtable^.write;
|
|
||||||
refsymtable^.write_browser;
|
|
||||||
end;
|
|
||||||
{ must be done only after local symtable ref stores !! }
|
{ must be done only after local symtable ref stores !! }
|
||||||
closecurrentppu;
|
closecurrentppu;
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
@ -1259,7 +1247,11 @@ unit pmodules;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.99 1999-02-22 13:06:58 pierre
|
Revision 1.100 1999-02-23 18:29:20 pierre
|
||||||
|
* win32 compilation error fix
|
||||||
|
+ some work for local browser (not cl=omplete yet)
|
||||||
|
|
||||||
|
Revision 1.99 1999/02/22 13:06:58 pierre
|
||||||
+ -b and -bl options work !
|
+ -b and -bl options work !
|
||||||
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
|
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
|
||||||
is not enabled when quitting global section
|
is not enabled when quitting global section
|
||||||
|
@ -2229,9 +2229,14 @@
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Const local_symtable_index : longint = $8001;
|
||||||
|
|
||||||
procedure tprocdef.load_references;
|
procedure tprocdef.load_references;
|
||||||
var
|
var
|
||||||
pos : tfileposinfo;
|
pos : tfileposinfo;
|
||||||
|
{$ifdef TESTLOCALBROWSER}
|
||||||
|
pdo : pobjectdef;
|
||||||
|
{$endif def TESTLOCALBROWSER}
|
||||||
move_last : boolean;
|
move_last : boolean;
|
||||||
begin
|
begin
|
||||||
move_last:=lastwritten=lastref;
|
move_last:=lastwritten=lastref;
|
||||||
@ -2248,12 +2253,48 @@
|
|||||||
lastwritten:=lastref;
|
lastwritten:=lastref;
|
||||||
if (current_module^.flags and uf_local_browser)<>0 then
|
if (current_module^.flags and uf_local_browser)<>0 then
|
||||||
begin
|
begin
|
||||||
{$ifdef Dummy}
|
{$ifdef TESTLOCALBROWSER}
|
||||||
|
pdo:=_class;
|
||||||
|
if assigned(pdo) and (owner^.symtabletype<>localsymtable) then
|
||||||
|
localsymtablestack:=pdo^.publicsyms;
|
||||||
|
if owner^.symtabletype<>localsymtable then
|
||||||
|
while assigned(pdo) do
|
||||||
|
begin
|
||||||
|
if pdo^.publicsyms<>aktrecordsymtable then
|
||||||
|
begin
|
||||||
|
pdo^.publicsyms^.unitid:=local_symtable_index;
|
||||||
|
inc(local_symtable_index);
|
||||||
|
end;
|
||||||
|
pdo:=pdo^.childof;
|
||||||
|
end;
|
||||||
|
|
||||||
new(parast,loadas(parasymtable));
|
new(parast,loadas(parasymtable));
|
||||||
|
parast^.next:=localsymtablestack;
|
||||||
|
localsymtablestack:=parast;
|
||||||
|
parast^.unitid:=local_symtable_index;
|
||||||
|
inc(local_symtable_index);
|
||||||
parast^.load_browser;
|
parast^.load_browser;
|
||||||
new(localst,loadas(localsymtable));
|
new(localst,loadas(localsymtable));
|
||||||
|
localst^.next:=localsymtablestack;
|
||||||
|
localsymtablestack:=localst;
|
||||||
|
localst^.unitid:=local_symtable_index;
|
||||||
|
inc(local_symtable_index);
|
||||||
localst^.load_browser;
|
localst^.load_browser;
|
||||||
{$endif def Dummy}
|
{ decrement for }
|
||||||
|
local_symtable_index:=local_symtable_index-2;
|
||||||
|
localsymtablestack:=localsymtablestack^.next^.next;
|
||||||
|
pdo:=_class;
|
||||||
|
if (owner^.symtabletype<>localsymtable) then
|
||||||
|
localsymtablestack:=nil;
|
||||||
|
if (owner^.symtabletype<>localsymtable) then
|
||||||
|
while assigned(pdo) do
|
||||||
|
begin
|
||||||
|
if pdo^.publicsyms<>aktrecordsymtable then
|
||||||
|
dec(local_symtable_index);
|
||||||
|
pdo:=pdo^.childof;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$endif def TESTLOCALBROWSER}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2261,6 +2302,9 @@
|
|||||||
function tprocdef.write_references : boolean;
|
function tprocdef.write_references : boolean;
|
||||||
var
|
var
|
||||||
ref : pref;
|
ref : pref;
|
||||||
|
{$ifdef TESTLOCALBROWSER}
|
||||||
|
pdo : pobjectdef;
|
||||||
|
{$endif def TESTLOCALBROWSER}
|
||||||
move_last : boolean;
|
move_last : boolean;
|
||||||
begin
|
begin
|
||||||
move_last:=lastwritten=lastref;
|
move_last:=lastwritten=lastref;
|
||||||
@ -2292,18 +2336,44 @@
|
|||||||
write_references:=true;
|
write_references:=true;
|
||||||
if (current_module^.flags and uf_local_browser)<>0 then
|
if (current_module^.flags and uf_local_browser)<>0 then
|
||||||
begin
|
begin
|
||||||
{$ifdef Dummy}
|
{$ifdef TESTLOCALBROWSER}
|
||||||
{ we need dummy para and local symtables
|
pdo:=_class;
|
||||||
|
if (owner^.symtabletype<>localsymtable) then
|
||||||
|
while assigned(pdo) do
|
||||||
|
begin
|
||||||
|
if pdo^.publicsyms<>aktrecordsymtable then
|
||||||
|
begin
|
||||||
|
pdo^.publicsyms^.unitid:=local_symtable_index;
|
||||||
|
inc(local_symtable_index);
|
||||||
|
end;
|
||||||
|
pdo:=pdo^.childof;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ we need TESTLOCALBROWSER para and local symtables
|
||||||
PPU files are then easier to read PM }
|
PPU files are then easier to read PM }
|
||||||
if not assigned(parast) then
|
if not assigned(parast) then
|
||||||
parast:=new(psymtable,init(parasymtable));
|
parast:=new(psymtable,init(parasymtable));
|
||||||
parast^.writeas;
|
parast^.writeas;
|
||||||
|
parast^.unitid:=local_symtable_index;
|
||||||
|
inc(local_symtable_index);
|
||||||
parast^.write_browser;
|
parast^.write_browser;
|
||||||
if not assigned(localst) then
|
if not assigned(localst) then
|
||||||
localst:=new(psymtable,init(localsymtable));
|
localst:=new(psymtable,init(localsymtable));
|
||||||
localst^.writeas;
|
localst^.writeas;
|
||||||
|
localst^.unitid:=local_symtable_index;
|
||||||
|
inc(local_symtable_index);
|
||||||
localst^.write_browser;
|
localst^.write_browser;
|
||||||
{$endif def Dummy}
|
{ decrement for }
|
||||||
|
local_symtable_index:=local_symtable_index-2;
|
||||||
|
pdo:=_class;
|
||||||
|
if (owner^.symtabletype<>localsymtable) then
|
||||||
|
while assigned(pdo) do
|
||||||
|
begin
|
||||||
|
if pdo^.publicsyms<>aktrecordsymtable then
|
||||||
|
dec(local_symtable_index);
|
||||||
|
pdo:=pdo^.childof;
|
||||||
|
end;
|
||||||
|
{$endif def TESTLOCALBROWSER}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3308,7 +3378,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.94 1999-02-22 20:13:38 florian
|
Revision 1.95 1999-02-23 18:29:23 pierre
|
||||||
|
* win32 compilation error fix
|
||||||
|
+ some work for local browser (not cl=omplete yet)
|
||||||
|
|
||||||
|
Revision 1.94 1999/02/22 20:13:38 florian
|
||||||
+ first implementation of message keyword
|
+ first implementation of message keyword
|
||||||
|
|
||||||
Revision 1.93 1999/02/22 13:07:07 pierre
|
Revision 1.93 1999/02/22 13:07:07 pierre
|
||||||
|
@ -111,8 +111,10 @@
|
|||||||
begin
|
begin
|
||||||
if p^.owner^.symtabletype=staticsymtable then
|
if p^.owner^.symtabletype=staticsymtable then
|
||||||
current_ppu^.putword($fffe)
|
current_ppu^.putword($fffe)
|
||||||
else if not (p^.owner^.symtabletype in [unitsymtable,globalsymtable]) then
|
else if (p^.owner=aktrecordsymtable) then
|
||||||
current_ppu^.putword($ffff)
|
current_ppu^.putword($ffff)
|
||||||
|
else if p^.owner^.unitid>$8000 then
|
||||||
|
current_ppu^.putword(p^.owner^.unitid)
|
||||||
else
|
else
|
||||||
current_ppu^.putword(p^.owner^.unitid);
|
current_ppu^.putword(p^.owner^.unitid);
|
||||||
current_ppu^.putword(p^.indexnb);
|
current_ppu^.putword(p^.indexnb);
|
||||||
@ -128,8 +130,10 @@
|
|||||||
begin
|
begin
|
||||||
if p^.owner^.symtabletype=staticsymtable then
|
if p^.owner^.symtabletype=staticsymtable then
|
||||||
current_ppu^.putword($fffe)
|
current_ppu^.putword($fffe)
|
||||||
else if not (p^.owner^.symtabletype in [unitsymtable,globalsymtable]) then
|
else if (p^.owner=aktrecordsymtable) then
|
||||||
current_ppu^.putword($ffff)
|
current_ppu^.putword($ffff)
|
||||||
|
else if p^.owner^.unitid>$8000 then
|
||||||
|
current_ppu^.putword(p^.owner^.unitid)
|
||||||
else
|
else
|
||||||
current_ppu^.putword(p^.owner^.unitid);
|
current_ppu^.putword(p^.owner^.unitid);
|
||||||
current_ppu^.putword(p^.indexnb);
|
current_ppu^.putword(p^.indexnb);
|
||||||
@ -448,7 +452,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.32 1999-02-22 13:07:08 pierre
|
Revision 1.33 1999-02-23 18:29:25 pierre
|
||||||
|
* win32 compilation error fix
|
||||||
|
+ some work for local browser (not cl=omplete yet)
|
||||||
|
|
||||||
|
Revision 1.32 1999/02/22 13:07:08 pierre
|
||||||
+ -b and -bl options work !
|
+ -b and -bl options work !
|
||||||
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
|
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
|
||||||
is not enabled when quitting global section
|
is not enabled when quitting global section
|
||||||
|
@ -1704,9 +1704,9 @@
|
|||||||
begin
|
begin
|
||||||
inherited load_references;
|
inherited load_references;
|
||||||
if (definition^.deftype=recorddef) then
|
if (definition^.deftype=recorddef) then
|
||||||
precdef(definition)^.symtable^.load_browser;
|
precdef(definition)^.symtable^.load_browser;
|
||||||
if (definition^.deftype=objectdef) then
|
if (definition^.deftype=objectdef) then
|
||||||
pobjectdef(definition)^.publicsyms^.load_browser;
|
pobjectdef(definition)^.publicsyms^.load_browser;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1724,9 +1724,9 @@
|
|||||||
end;
|
end;
|
||||||
write_references:=true;
|
write_references:=true;
|
||||||
if (definition^.deftype=recorddef) then
|
if (definition^.deftype=recorddef) then
|
||||||
precdef(definition)^.symtable^.write_browser;
|
precdef(definition)^.symtable^.write_browser;
|
||||||
if (definition^.deftype=objectdef) then
|
if (definition^.deftype=objectdef) then
|
||||||
pobjectdef(definition)^.publicsyms^.write_browser;
|
pobjectdef(definition)^.publicsyms^.write_browser;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1811,7 +1811,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.73 1999-02-22 13:07:09 pierre
|
Revision 1.74 1999-02-23 18:29:27 pierre
|
||||||
|
* win32 compilation error fix
|
||||||
|
+ some work for local browser (not cl=omplete yet)
|
||||||
|
|
||||||
|
Revision 1.73 1999/02/22 13:07:09 pierre
|
||||||
+ -b and -bl options work !
|
+ -b and -bl options work !
|
||||||
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
|
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
|
||||||
is not enabled when quitting global section
|
is not enabled when quitting global section
|
||||||
|
Loading…
Reference in New Issue
Block a user