* some memory leaks specific to usebrowser define fixed

* removed tmodule.implsymtable (was like tmodule.localsymtable)
This commit is contained in:
pierre 1998-10-09 16:36:01 +00:00
parent 6f470079a0
commit 63ff2ffbbc
5 changed files with 55 additions and 22 deletions

View File

@ -75,6 +75,8 @@ type
var
browse : tbrowser;
procedure InitBrowser;
procedure DoneBrowser;
function get_source_file(moduleindex,fileindex : word) : pinputfile;
implementation
@ -103,14 +105,12 @@ implementation
destructor tref.done;
var
inputfile : pinputfile;
ref : pref;
begin
inputfile:=get_source_file(moduleindex,posinfo.fileindex);
if inputfile<>nil then
dec(inputfile^.ref_count);
ref:=@self;
if assigned(ref^.nextref) then
dispose(ref^.nextref,done);
if assigned(nextref) then
dispose(nextref,done);
nextref:=nil;
end;
@ -471,12 +471,24 @@ implementation
end;
end;
begin
browse.init
procedure InitBrowser;
begin
browse.init;
end;
procedure DoneBrowser;
begin
browse.done;
end;
end.
{
$Log$
Revision 1.11 1998-10-08 17:17:09 pierre
Revision 1.12 1998-10-09 16:36:01 pierre
* some memory leaks specific to usebrowser define fixed
* removed tmodule.implsymtable (was like tmodule.localsymtable)
Revision 1.11 1998/10/08 17:17:09 pierre
* current_module old scanner tagged as invalid if unit is recompiled
+ added ppheap for better info on tracegetmem of heaptrc
(adds line column and file index)

View File

@ -86,6 +86,9 @@ uses
{$ifdef USEEXCEPT}
tpexcept,
{$endif USEEXCEPT}
{$ifdef UseBrowser}
browser,
{$endif UseBrowser}
dos,verbose,comphook,systems,
globals,options,parser,symtable,link,import;
@ -125,11 +128,17 @@ begin
CompilerInited:=false;
doneparser;
DoneImport;
{$ifdef UseBrowser}
DoneBrowser;
{$endif UseBrowser}
end;
procedure InitCompiler(const cmd:string);
begin
{$ifdef UseBrowser}
InitBrowser;
{$endif UseBrowser}
if CompilerInited then
DoneCompiler;
{ inits which need to be done before the arguments are parsed }
@ -230,7 +239,11 @@ end;
end.
{
$Log$
Revision 1.11 1998-10-08 23:28:51 peter
Revision 1.12 1998-10-09 16:36:02 pierre
* some memory leaks specific to usebrowser define fixed
* removed tmodule.implsymtable (was like tmodule.localsymtable)
Revision 1.11 1998/10/08 23:28:51 peter
* -vu shows unit info, -vt shows tried/used files
Revision 1.10 1998/10/08 17:17:18 pierre

View File

@ -134,9 +134,6 @@ unit files;
unit_index : word; { global counter for browser }
globalsymtable, { pointer to the local/static symtable of this unit }
localsymtable : pointer; { pointer to the psymtable of this unit }
{$ifdef UseBrowser}
implsymtable : pointer;
{$endif UseBrowser}
scanner : pointer; { scanner object used }
loaded_from : pmodule;
uses_imports : boolean; { Set if the module imports from DLL's.}
@ -902,9 +899,6 @@ unit files;
map:=nil;
globalsymtable:=nil;
localsymtable:=nil;
{$ifdef UseBrowser}
implsymtable:=nil;
{$endif UseBrowser}
loaded_from:=nil;
flags:=0;
crc:=0;
@ -1007,7 +1001,11 @@ unit files;
end.
{
$Log$
Revision 1.56 1998-10-09 08:56:26 pierre
Revision 1.57 1998-10-09 16:36:03 pierre
* some memory leaks specific to usebrowser define fixed
* removed tmodule.implsymtable (was like tmodule.localsymtable)
Revision 1.56 1998/10/09 08:56:26 pierre
* several memory leaks fixed
Revision 1.55 1998/10/08 23:28:54 peter

View File

@ -273,10 +273,10 @@ unit pmodules;
if ((current_module^.flags and uf_has_browser)<>0) and
(cs_local_browser in aktmoduleswitches) then
begin
current_module^.implsymtable:=new(psymtable,load);
psymtable(current_module^.implsymtable)^.name:=
current_module^.localsymtable:=new(psymtable,load);
psymtable(current_module^.localsymtable)^.name:=
stringdup('implementation of '+psymtable(current_module^.globalsymtable)^.name^);
psymtable(current_module^.implsymtable)^.load_browser;
psymtable(current_module^.localsymtable)^.load_browser;
end;
{$endif UseBrowser}
{ remove the map, it's not needed anymore }
@ -905,7 +905,7 @@ unit pmodules;
{$ifdef UseBrowser}
if cs_local_browser in aktmoduleswitches then
begin
current_module^.implsymtable:=refsymtable;
current_module^.localsymtable:=refsymtable;
refsymtable^.write;
refsymtable^.write_browser;
end;
@ -923,8 +923,8 @@ unit pmodules;
{ remove static symtable (=refsymtable) here to save some mem }
{$ifndef UseBrowser}
dispose(st,done);
{$endif UseBrowser}
current_module^.localsymtable:=nil;
{$endif UseBrowser}
{ generate imports }
if current_module^.uses_imports then
@ -1071,7 +1071,11 @@ unit pmodules;
end.
{
$Log$
Revision 1.65 1998-10-09 14:38:55 pierre
Revision 1.66 1998-10-09 16:36:05 pierre
* some memory leaks specific to usebrowser define fixed
* removed tmodule.implsymtable (was like tmodule.localsymtable)
Revision 1.65 1998/10/09 14:38:55 pierre
* add a second load for PPU file
Revision 1.64 1998/10/09 08:56:28 pierre

View File

@ -693,6 +693,8 @@ implementation
if make_ref then
begin
procs^.data^.lastref:=new(pref,init(procs^.data^.lastref,@p^.fileinfo));
if procs^.data^.defref=nil then
procs^.data^.defref:=procs^.data^.lastref;
end;
{$endif UseBrowser}
@ -921,7 +923,11 @@ implementation
end.
{
$Log$
Revision 1.7 1998-10-06 20:49:09 peter
Revision 1.8 1998-10-09 16:36:09 pierre
* some memory leaks specific to usebrowser define fixed
* removed tmodule.implsymtable (was like tmodule.localsymtable)
Revision 1.7 1998/10/06 20:49:09 peter
* m68k compiler compiles again
Revision 1.6 1998/10/02 09:24:22 peter