mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 05:29:18 +02:00
* some memory leaks specific to usebrowser define fixed
* removed tmodule.implsymtable (was like tmodule.localsymtable)
This commit is contained in:
parent
6f470079a0
commit
63ff2ffbbc
@ -75,6 +75,8 @@ type
|
|||||||
var
|
var
|
||||||
browse : tbrowser;
|
browse : tbrowser;
|
||||||
|
|
||||||
|
procedure InitBrowser;
|
||||||
|
procedure DoneBrowser;
|
||||||
function get_source_file(moduleindex,fileindex : word) : pinputfile;
|
function get_source_file(moduleindex,fileindex : word) : pinputfile;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -103,14 +105,12 @@ implementation
|
|||||||
destructor tref.done;
|
destructor tref.done;
|
||||||
var
|
var
|
||||||
inputfile : pinputfile;
|
inputfile : pinputfile;
|
||||||
ref : pref;
|
|
||||||
begin
|
begin
|
||||||
inputfile:=get_source_file(moduleindex,posinfo.fileindex);
|
inputfile:=get_source_file(moduleindex,posinfo.fileindex);
|
||||||
if inputfile<>nil then
|
if inputfile<>nil then
|
||||||
dec(inputfile^.ref_count);
|
dec(inputfile^.ref_count);
|
||||||
ref:=@self;
|
if assigned(nextref) then
|
||||||
if assigned(ref^.nextref) then
|
dispose(nextref,done);
|
||||||
dispose(ref^.nextref,done);
|
|
||||||
nextref:=nil;
|
nextref:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -471,12 +471,24 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
procedure InitBrowser;
|
||||||
browse.init
|
begin
|
||||||
|
browse.init;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DoneBrowser;
|
||||||
|
begin
|
||||||
|
browse.done;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* current_module old scanner tagged as invalid if unit is recompiled
|
||||||
+ added ppheap for better info on tracegetmem of heaptrc
|
+ added ppheap for better info on tracegetmem of heaptrc
|
||||||
(adds line column and file index)
|
(adds line column and file index)
|
||||||
|
@ -86,6 +86,9 @@ uses
|
|||||||
{$ifdef USEEXCEPT}
|
{$ifdef USEEXCEPT}
|
||||||
tpexcept,
|
tpexcept,
|
||||||
{$endif USEEXCEPT}
|
{$endif USEEXCEPT}
|
||||||
|
{$ifdef UseBrowser}
|
||||||
|
browser,
|
||||||
|
{$endif UseBrowser}
|
||||||
dos,verbose,comphook,systems,
|
dos,verbose,comphook,systems,
|
||||||
globals,options,parser,symtable,link,import;
|
globals,options,parser,symtable,link,import;
|
||||||
|
|
||||||
@ -125,11 +128,17 @@ begin
|
|||||||
CompilerInited:=false;
|
CompilerInited:=false;
|
||||||
doneparser;
|
doneparser;
|
||||||
DoneImport;
|
DoneImport;
|
||||||
|
{$ifdef UseBrowser}
|
||||||
|
DoneBrowser;
|
||||||
|
{$endif UseBrowser}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure InitCompiler(const cmd:string);
|
procedure InitCompiler(const cmd:string);
|
||||||
begin
|
begin
|
||||||
|
{$ifdef UseBrowser}
|
||||||
|
InitBrowser;
|
||||||
|
{$endif UseBrowser}
|
||||||
if CompilerInited then
|
if CompilerInited then
|
||||||
DoneCompiler;
|
DoneCompiler;
|
||||||
{ inits which need to be done before the arguments are parsed }
|
{ inits which need to be done before the arguments are parsed }
|
||||||
@ -230,7 +239,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* -vu shows unit info, -vt shows tried/used files
|
||||||
|
|
||||||
Revision 1.10 1998/10/08 17:17:18 pierre
|
Revision 1.10 1998/10/08 17:17:18 pierre
|
||||||
|
@ -134,9 +134,6 @@ unit files;
|
|||||||
unit_index : word; { global counter for browser }
|
unit_index : word; { global counter for browser }
|
||||||
globalsymtable, { pointer to the local/static symtable of this unit }
|
globalsymtable, { pointer to the local/static symtable of this unit }
|
||||||
localsymtable : pointer; { pointer to the psymtable of this unit }
|
localsymtable : pointer; { pointer to the psymtable of this unit }
|
||||||
{$ifdef UseBrowser}
|
|
||||||
implsymtable : pointer;
|
|
||||||
{$endif UseBrowser}
|
|
||||||
scanner : pointer; { scanner object used }
|
scanner : pointer; { scanner object used }
|
||||||
loaded_from : pmodule;
|
loaded_from : pmodule;
|
||||||
uses_imports : boolean; { Set if the module imports from DLL's.}
|
uses_imports : boolean; { Set if the module imports from DLL's.}
|
||||||
@ -902,9 +899,6 @@ unit files;
|
|||||||
map:=nil;
|
map:=nil;
|
||||||
globalsymtable:=nil;
|
globalsymtable:=nil;
|
||||||
localsymtable:=nil;
|
localsymtable:=nil;
|
||||||
{$ifdef UseBrowser}
|
|
||||||
implsymtable:=nil;
|
|
||||||
{$endif UseBrowser}
|
|
||||||
loaded_from:=nil;
|
loaded_from:=nil;
|
||||||
flags:=0;
|
flags:=0;
|
||||||
crc:=0;
|
crc:=0;
|
||||||
@ -1007,7 +1001,11 @@ unit files;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* several memory leaks fixed
|
||||||
|
|
||||||
Revision 1.55 1998/10/08 23:28:54 peter
|
Revision 1.55 1998/10/08 23:28:54 peter
|
||||||
|
@ -273,10 +273,10 @@ unit pmodules;
|
|||||||
if ((current_module^.flags and uf_has_browser)<>0) and
|
if ((current_module^.flags and uf_has_browser)<>0) and
|
||||||
(cs_local_browser in aktmoduleswitches) then
|
(cs_local_browser in aktmoduleswitches) then
|
||||||
begin
|
begin
|
||||||
current_module^.implsymtable:=new(psymtable,load);
|
current_module^.localsymtable:=new(psymtable,load);
|
||||||
psymtable(current_module^.implsymtable)^.name:=
|
psymtable(current_module^.localsymtable)^.name:=
|
||||||
stringdup('implementation of '+psymtable(current_module^.globalsymtable)^.name^);
|
stringdup('implementation of '+psymtable(current_module^.globalsymtable)^.name^);
|
||||||
psymtable(current_module^.implsymtable)^.load_browser;
|
psymtable(current_module^.localsymtable)^.load_browser;
|
||||||
end;
|
end;
|
||||||
{$endif UseBrowser}
|
{$endif UseBrowser}
|
||||||
{ remove the map, it's not needed anymore }
|
{ remove the map, it's not needed anymore }
|
||||||
@ -905,7 +905,7 @@ unit pmodules;
|
|||||||
{$ifdef UseBrowser}
|
{$ifdef UseBrowser}
|
||||||
if cs_local_browser in aktmoduleswitches then
|
if cs_local_browser in aktmoduleswitches then
|
||||||
begin
|
begin
|
||||||
current_module^.implsymtable:=refsymtable;
|
current_module^.localsymtable:=refsymtable;
|
||||||
refsymtable^.write;
|
refsymtable^.write;
|
||||||
refsymtable^.write_browser;
|
refsymtable^.write_browser;
|
||||||
end;
|
end;
|
||||||
@ -923,8 +923,8 @@ unit pmodules;
|
|||||||
{ remove static symtable (=refsymtable) here to save some mem }
|
{ remove static symtable (=refsymtable) here to save some mem }
|
||||||
{$ifndef UseBrowser}
|
{$ifndef UseBrowser}
|
||||||
dispose(st,done);
|
dispose(st,done);
|
||||||
{$endif UseBrowser}
|
|
||||||
current_module^.localsymtable:=nil;
|
current_module^.localsymtable:=nil;
|
||||||
|
{$endif UseBrowser}
|
||||||
|
|
||||||
{ generate imports }
|
{ generate imports }
|
||||||
if current_module^.uses_imports then
|
if current_module^.uses_imports then
|
||||||
@ -1071,7 +1071,11 @@ unit pmodules;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* add a second load for PPU file
|
||||||
|
|
||||||
Revision 1.64 1998/10/09 08:56:28 pierre
|
Revision 1.64 1998/10/09 08:56:28 pierre
|
||||||
|
@ -693,6 +693,8 @@ implementation
|
|||||||
if make_ref then
|
if make_ref then
|
||||||
begin
|
begin
|
||||||
procs^.data^.lastref:=new(pref,init(procs^.data^.lastref,@p^.fileinfo));
|
procs^.data^.lastref:=new(pref,init(procs^.data^.lastref,@p^.fileinfo));
|
||||||
|
if procs^.data^.defref=nil then
|
||||||
|
procs^.data^.defref:=procs^.data^.lastref;
|
||||||
end;
|
end;
|
||||||
{$endif UseBrowser}
|
{$endif UseBrowser}
|
||||||
|
|
||||||
@ -921,7 +923,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* m68k compiler compiles again
|
||||||
|
|
||||||
Revision 1.6 1998/10/02 09:24:22 peter
|
Revision 1.6 1998/10/02 09:24:22 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user