mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 10:59:24 +02:00
+ improvement on the usebrowser part
(does not work correctly for now)
This commit is contained in:
parent
1151b6d698
commit
be29a0b86d
@ -303,48 +303,46 @@ unit parser;
|
|||||||
{!!! No check for unused macros yet !!! }
|
{!!! No check for unused macros yet !!! }
|
||||||
dispose(macros,done);
|
dispose(macros,done);
|
||||||
|
|
||||||
{ restore scanner }
|
|
||||||
c:=oldc;
|
|
||||||
pattern:=oldpattern;
|
|
||||||
orgpattern:=oldorgpattern;
|
|
||||||
token:=oldtoken;
|
|
||||||
tokenpos:=oldtokenpos;
|
|
||||||
block_type:=old_block_type;
|
|
||||||
current_scanner:=oldcurrent_scanner;
|
|
||||||
{ restore cg }
|
|
||||||
nextlabelnr:=oldnextlabelnr;
|
|
||||||
parse_only:=oldparse_only;
|
|
||||||
{ restore asmlists }
|
|
||||||
exprasmlist:=oldexprasmlist;
|
|
||||||
datasegment:=olddatasegment;
|
|
||||||
bsssegment:=oldbsssegment;
|
|
||||||
codesegment:=oldcodesegment;
|
|
||||||
consts:=oldconsts;
|
|
||||||
debuglist:=olddebuglist;
|
|
||||||
externals:=oldexternals;
|
|
||||||
internals:=oldinternals;
|
|
||||||
importssection:=oldimports;
|
|
||||||
exportssection:=oldexports;
|
|
||||||
resourcesection:=oldresource;
|
|
||||||
rttilist:=oldrttilist;
|
|
||||||
{ restore symtable state }
|
|
||||||
if (compile_level>1) then
|
if (compile_level>1) then
|
||||||
begin
|
begin
|
||||||
refsymtable:=oldrefsymtable;
|
{ restore scanner }
|
||||||
symtablestack:=oldsymtablestack;
|
c:=oldc;
|
||||||
|
pattern:=oldpattern;
|
||||||
|
orgpattern:=oldorgpattern;
|
||||||
|
token:=oldtoken;
|
||||||
|
tokenpos:=oldtokenpos;
|
||||||
|
block_type:=old_block_type;
|
||||||
|
current_scanner:=oldcurrent_scanner;
|
||||||
|
{ restore cg }
|
||||||
|
nextlabelnr:=oldnextlabelnr;
|
||||||
|
parse_only:=oldparse_only;
|
||||||
|
{ restore asmlists }
|
||||||
|
exprasmlist:=oldexprasmlist;
|
||||||
|
datasegment:=olddatasegment;
|
||||||
|
bsssegment:=oldbsssegment;
|
||||||
|
codesegment:=oldcodesegment;
|
||||||
|
consts:=oldconsts;
|
||||||
|
debuglist:=olddebuglist;
|
||||||
|
externals:=oldexternals;
|
||||||
|
internals:=oldinternals;
|
||||||
|
importssection:=oldimports;
|
||||||
|
exportssection:=oldexports;
|
||||||
|
resourcesection:=oldresource;
|
||||||
|
rttilist:=oldrttilist;
|
||||||
|
{ restore symtable state }
|
||||||
|
refsymtable:=oldrefsymtable;
|
||||||
|
symtablestack:=oldsymtablestack;
|
||||||
|
macros:=oldmacros;
|
||||||
|
aktprocsym:=oldaktprocsym;
|
||||||
|
procprefix:=oldprocprefix;
|
||||||
|
aktlocalswitches:=oldaktlocalswitches;
|
||||||
|
aktmoduleswitches:=oldaktmoduleswitches;
|
||||||
|
aktpackrecords:=oldaktpackrecords;
|
||||||
|
aktoutputformat:=oldaktoutputformat;
|
||||||
|
aktoptprocessor:=oldaktoptprocessor;
|
||||||
|
aktasmmode:=oldaktasmmode;
|
||||||
|
aktfilepos:=oldaktfilepos;
|
||||||
end;
|
end;
|
||||||
macros:=oldmacros;
|
|
||||||
aktprocsym:=oldaktprocsym;
|
|
||||||
procprefix:=oldprocprefix;
|
|
||||||
{ restore current state }
|
|
||||||
aktlocalswitches:=oldaktlocalswitches;
|
|
||||||
aktmoduleswitches:=oldaktmoduleswitches;
|
|
||||||
aktpackrecords:=oldaktpackrecords;
|
|
||||||
aktoutputformat:=oldaktoutputformat;
|
|
||||||
aktoptprocessor:=oldaktoptprocessor;
|
|
||||||
aktasmmode:=oldaktasmmode;
|
|
||||||
aktfilepos:=oldaktfilepos;
|
|
||||||
|
|
||||||
{ Shut down things when the last file is compiled }
|
{ Shut down things when the last file is compiled }
|
||||||
if (compile_level=1) then
|
if (compile_level=1) then
|
||||||
begin
|
begin
|
||||||
@ -359,9 +357,7 @@ unit parser;
|
|||||||
if cs_browser in aktmoduleswitches then
|
if cs_browser in aktmoduleswitches then
|
||||||
begin
|
begin
|
||||||
Message1(parser_i_writing_browser_log,Browse.Fname);
|
Message1(parser_i_writing_browser_log,Browse.Fname);
|
||||||
Browse.CreateLog;
|
|
||||||
write_browser_log;
|
write_browser_log;
|
||||||
Browse.CloseLog;
|
|
||||||
end;
|
end;
|
||||||
{$endif UseBrowser}
|
{$endif UseBrowser}
|
||||||
end;
|
end;
|
||||||
@ -372,7 +368,11 @@ unit parser;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.44 1998-09-10 15:25:34 daniel
|
Revision 1.45 1998-09-18 08:01:35 pierre
|
||||||
|
+ improvement on the usebrowser part
|
||||||
|
(does not work correctly for now)
|
||||||
|
|
||||||
|
Revision 1.44 1998/09/10 15:25:34 daniel
|
||||||
+ Added maxheapsize.
|
+ Added maxheapsize.
|
||||||
* Corrected semi-bug in calling the assembler and the linker
|
* Corrected semi-bug in calling the assembler and the linker
|
||||||
|
|
||||||
|
@ -178,10 +178,11 @@ unit pmodules;
|
|||||||
var
|
var
|
||||||
pu : pused_unit;
|
pu : pused_unit;
|
||||||
loaded_unit : pmodule;
|
loaded_unit : pmodule;
|
||||||
nextmapentry : longint;
|
nextmapentry,firstimplementation : longint;
|
||||||
begin
|
begin
|
||||||
{ init the map }
|
{ init the map }
|
||||||
new(current_module^.map);
|
new(current_module^.map);
|
||||||
|
fillchar(current_module^.map^,sizeof(tunitmap),#0);
|
||||||
nextmapentry:=1;
|
nextmapentry:=1;
|
||||||
{ load the used units from interface }
|
{ load the used units from interface }
|
||||||
pu:=pused_unit(current_module^.used_units.first);
|
pu:=pused_unit(current_module^.used_units.first);
|
||||||
@ -209,6 +210,7 @@ unit pmodules;
|
|||||||
end;
|
end;
|
||||||
pu:=pused_unit(pu^.next);
|
pu:=pused_unit(pu^.next);
|
||||||
end;
|
end;
|
||||||
|
firstimplementation:=nextmapentry;
|
||||||
{ ok, now load the unit }
|
{ ok, now load the unit }
|
||||||
current_module^.symtable:=new(punitsymtable,loadasunit);
|
current_module^.symtable:=new(punitsymtable,loadasunit);
|
||||||
{ if this is the system unit insert the intern symbols }
|
{ if this is the system unit insert the intern symbols }
|
||||||
@ -239,16 +241,23 @@ unit pmodules;
|
|||||||
current_module^.do_compile:=true;
|
current_module^.do_compile:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
{$endif TEST_IMPL}
|
||||||
{ setup the map entry for deref }
|
{ setup the map entry for deref }
|
||||||
current_module^.map^[nextmapentry]:=loaded_unit^.symtable;
|
current_module^.map^[nextmapentry]:=loaded_unit^.symtable;
|
||||||
inc(nextmapentry);
|
inc(nextmapentry);
|
||||||
if nextmapentry>maxunits then
|
if nextmapentry>maxunits then
|
||||||
Message(unit_f_too_much_units);
|
Message(unit_f_too_much_units);
|
||||||
{$endif TEST_IMPL}
|
|
||||||
end;
|
end;
|
||||||
pu:=pused_unit(pu^.next);
|
pu:=pused_unit(pu^.next);
|
||||||
end;
|
end;
|
||||||
{ remove the map, it's not needed anymore }
|
{$ifdef UseBrowser}
|
||||||
|
if cs_browser in aktmoduleswitches then
|
||||||
|
begin
|
||||||
|
punitsymtable(current_module^.symtable)^.
|
||||||
|
load_implementation_refs(firstimplementation);
|
||||||
|
end;
|
||||||
|
{$endif UseBrowser}
|
||||||
|
{ remove the map, it's not needed anymore }
|
||||||
dispose(current_module^.map);
|
dispose(current_module^.map);
|
||||||
current_module^.map:=nil;
|
current_module^.map:=nil;
|
||||||
end;
|
end;
|
||||||
@ -916,7 +925,11 @@ unit pmodules;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.48 1998-09-09 15:33:07 peter
|
Revision 1.49 1998-09-18 08:01:36 pierre
|
||||||
|
+ improvement on the usebrowser part
|
||||||
|
(does not work correctly for now)
|
||||||
|
|
||||||
|
Revision 1.48 1998/09/09 15:33:07 peter
|
||||||
* fixed in_global to allow directives also after interface token
|
* fixed in_global to allow directives also after interface token
|
||||||
|
|
||||||
Revision 1.47 1998/09/09 11:50:55 pierre
|
Revision 1.47 1998/09/09 11:50:55 pierre
|
||||||
|
@ -58,6 +58,8 @@ const
|
|||||||
ibdbxcount = 9;
|
ibdbxcount = 9;
|
||||||
ibsymref = 10;
|
ibsymref = 10;
|
||||||
ibdefref = 11;
|
ibdefref = 11;
|
||||||
|
ibendsymtablebrowser = 12;
|
||||||
|
ibbeginsymtablebrowser = 13;
|
||||||
{syms}
|
{syms}
|
||||||
ibtypesym = 20;
|
ibtypesym = 20;
|
||||||
ibprocsym = 21;
|
ibprocsym = 21;
|
||||||
@ -770,7 +772,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.11 1998-09-11 15:16:47 peter
|
Revision 1.12 1998-09-18 08:01:37 pierre
|
||||||
|
+ improvement on the usebrowser part
|
||||||
|
(does not work correctly for now)
|
||||||
|
|
||||||
|
Revision 1.11 1998/09/11 15:16:47 peter
|
||||||
* merge fixes
|
* merge fixes
|
||||||
|
|
||||||
Revision 1.10.2.1 1998/09/11 15:15:04 peter
|
Revision 1.10.2.1 1998/09/11 15:15:04 peter
|
||||||
|
@ -1545,8 +1545,6 @@
|
|||||||
{$ifdef UseBrowser}
|
{$ifdef UseBrowser}
|
||||||
|
|
||||||
procedure ttypesym.load_references;
|
procedure ttypesym.load_references;
|
||||||
var
|
|
||||||
prdef : pdef;
|
|
||||||
begin
|
begin
|
||||||
inherited load_references;
|
inherited load_references;
|
||||||
if (definition^.deftype=recorddef) then
|
if (definition^.deftype=recorddef) then
|
||||||
@ -1556,10 +1554,21 @@
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ttypesym.write_references;
|
procedure ttypesym.write_references;
|
||||||
var
|
|
||||||
prdef : pdef;
|
|
||||||
begin
|
begin
|
||||||
inherited write_references;
|
if lastwritten<>lastref then
|
||||||
|
begin
|
||||||
|
inherited write_references;
|
||||||
|
end
|
||||||
|
{ write address of this symbol if record or object
|
||||||
|
even if no real refs are there
|
||||||
|
because we need it for the symtable }
|
||||||
|
else if (definition^.deftype=recorddef) or
|
||||||
|
(definition^.deftype=objectdef) then
|
||||||
|
begin
|
||||||
|
writesymref(@self);
|
||||||
|
current_ppu^.writeentry(ibsymref);
|
||||||
|
end;
|
||||||
|
|
||||||
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
|
||||||
@ -1646,7 +1655,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.42 1998-09-07 19:33:25 florian
|
Revision 1.43 1998-09-18 08:01:38 pierre
|
||||||
|
+ improvement on the usebrowser part
|
||||||
|
(does not work correctly for now)
|
||||||
|
|
||||||
|
Revision 1.42 1998/09/07 19:33:25 florian
|
||||||
+ some stuff for property rtti added:
|
+ some stuff for property rtti added:
|
||||||
- NameIndex of the TPropInfo record is now written correctly
|
- NameIndex of the TPropInfo record is now written correctly
|
||||||
- the DEFAULT/NODEFAULT keyword is supported now
|
- the DEFAULT/NODEFAULT keyword is supported now
|
||||||
|
Loading…
Reference in New Issue
Block a user