mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +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 !!! }
|
||||
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
|
||||
begin
|
||||
refsymtable:=oldrefsymtable;
|
||||
symtablestack:=oldsymtablestack;
|
||||
{ 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 }
|
||||
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;
|
||||
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 }
|
||||
if (compile_level=1) then
|
||||
begin
|
||||
@ -359,9 +357,7 @@ unit parser;
|
||||
if cs_browser in aktmoduleswitches then
|
||||
begin
|
||||
Message1(parser_i_writing_browser_log,Browse.Fname);
|
||||
Browse.CreateLog;
|
||||
write_browser_log;
|
||||
Browse.CloseLog;
|
||||
end;
|
||||
{$endif UseBrowser}
|
||||
end;
|
||||
@ -372,7 +368,11 @@ unit parser;
|
||||
end.
|
||||
{
|
||||
$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.
|
||||
* Corrected semi-bug in calling the assembler and the linker
|
||||
|
||||
|
@ -178,10 +178,11 @@ unit pmodules;
|
||||
var
|
||||
pu : pused_unit;
|
||||
loaded_unit : pmodule;
|
||||
nextmapentry : longint;
|
||||
nextmapentry,firstimplementation : longint;
|
||||
begin
|
||||
{ init the map }
|
||||
new(current_module^.map);
|
||||
fillchar(current_module^.map^,sizeof(tunitmap),#0);
|
||||
nextmapentry:=1;
|
||||
{ load the used units from interface }
|
||||
pu:=pused_unit(current_module^.used_units.first);
|
||||
@ -209,6 +210,7 @@ unit pmodules;
|
||||
end;
|
||||
pu:=pused_unit(pu^.next);
|
||||
end;
|
||||
firstimplementation:=nextmapentry;
|
||||
{ ok, now load the unit }
|
||||
current_module^.symtable:=new(punitsymtable,loadasunit);
|
||||
{ if this is the system unit insert the intern symbols }
|
||||
@ -239,16 +241,23 @@ unit pmodules;
|
||||
current_module^.do_compile:=true;
|
||||
exit;
|
||||
end;
|
||||
{$endif TEST_IMPL}
|
||||
{ setup the map entry for deref }
|
||||
current_module^.map^[nextmapentry]:=loaded_unit^.symtable;
|
||||
inc(nextmapentry);
|
||||
if nextmapentry>maxunits then
|
||||
Message(unit_f_too_much_units);
|
||||
{$endif TEST_IMPL}
|
||||
end;
|
||||
pu:=pused_unit(pu^.next);
|
||||
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);
|
||||
current_module^.map:=nil;
|
||||
end;
|
||||
@ -916,7 +925,11 @@ unit pmodules;
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.47 1998/09/09 11:50:55 pierre
|
||||
|
@ -58,6 +58,8 @@ const
|
||||
ibdbxcount = 9;
|
||||
ibsymref = 10;
|
||||
ibdefref = 11;
|
||||
ibendsymtablebrowser = 12;
|
||||
ibbeginsymtablebrowser = 13;
|
||||
{syms}
|
||||
ibtypesym = 20;
|
||||
ibprocsym = 21;
|
||||
@ -770,7 +772,11 @@ end;
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.10.2.1 1998/09/11 15:15:04 peter
|
||||
|
@ -1545,8 +1545,6 @@
|
||||
{$ifdef UseBrowser}
|
||||
|
||||
procedure ttypesym.load_references;
|
||||
var
|
||||
prdef : pdef;
|
||||
begin
|
||||
inherited load_references;
|
||||
if (definition^.deftype=recorddef) then
|
||||
@ -1556,10 +1554,21 @@
|
||||
end;
|
||||
|
||||
procedure ttypesym.write_references;
|
||||
var
|
||||
prdef : pdef;
|
||||
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
|
||||
precdef(definition)^.symtable^.write_browser;
|
||||
if (definition^.deftype=objectdef) then
|
||||
@ -1646,7 +1655,11 @@
|
||||
|
||||
{
|
||||
$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:
|
||||
- NameIndex of the TPropInfo record is now written correctly
|
||||
- the DEFAULT/NODEFAULT keyword is supported now
|
||||
|
Loading…
Reference in New Issue
Block a user