+ improvement on the usebrowser part

(does not work correctly for now)
This commit is contained in:
pierre 1998-09-18 08:01:35 +00:00
parent 1151b6d698
commit be29a0b86d
4 changed files with 85 additions and 53 deletions

View File

@ -303,6 +303,8 @@ unit parser;
{!!! No check for unused macros yet !!! } {!!! No check for unused macros yet !!! }
dispose(macros,done); dispose(macros,done);
if (compile_level>1) then
begin
{ restore scanner } { restore scanner }
c:=oldc; c:=oldc;
pattern:=oldpattern; pattern:=oldpattern;
@ -328,15 +330,11 @@ unit parser;
resourcesection:=oldresource; resourcesection:=oldresource;
rttilist:=oldrttilist; rttilist:=oldrttilist;
{ restore symtable state } { restore symtable state }
if (compile_level>1) then
begin
refsymtable:=oldrefsymtable; refsymtable:=oldrefsymtable;
symtablestack:=oldsymtablestack; symtablestack:=oldsymtablestack;
end;
macros:=oldmacros; macros:=oldmacros;
aktprocsym:=oldaktprocsym; aktprocsym:=oldaktprocsym;
procprefix:=oldprocprefix; procprefix:=oldprocprefix;
{ restore current state }
aktlocalswitches:=oldaktlocalswitches; aktlocalswitches:=oldaktlocalswitches;
aktmoduleswitches:=oldaktmoduleswitches; aktmoduleswitches:=oldaktmoduleswitches;
aktpackrecords:=oldaktpackrecords; aktpackrecords:=oldaktpackrecords;
@ -344,7 +342,7 @@ unit parser;
aktoptprocessor:=oldaktoptprocessor; aktoptprocessor:=oldaktoptprocessor;
aktasmmode:=oldaktasmmode; aktasmmode:=oldaktasmmode;
aktfilepos:=oldaktfilepos; aktfilepos:=oldaktfilepos;
end;
{ 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

View File

@ -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,15 +241,22 @@ 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;
{$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 } { remove the map, it's not needed anymore }
dispose(current_module^.map); dispose(current_module^.map);
current_module^.map:=nil; current_module^.map:=nil;
@ -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

View File

@ -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

View File

@ -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 begin
prdef : pdef; if lastwritten<>lastref then
begin begin
inherited write_references; 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