mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 19:49:22 +02:00
* several memory leaks fixed
This commit is contained in:
parent
9fc563b346
commit
7621dc0b56
@ -938,7 +938,7 @@ implementation
|
|||||||
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_B,newreference(p^.location.reference),
|
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_B,newreference(p^.location.reference),
|
||||||
hregister)));
|
hregister)));
|
||||||
end;
|
end;
|
||||||
clear_location(p^.left^.location);
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hregister;
|
p^.location.register:=hregister;
|
||||||
end;
|
end;
|
||||||
@ -1071,7 +1071,7 @@ implementation
|
|||||||
gten : flags:=F_AE;
|
gten : flags:=F_AE;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
clear_location(p^.left^.location);
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_FLAGS;
|
p^.location.loc:=LOC_FLAGS;
|
||||||
p^.location.resflags:=flags;
|
p^.location.resflags:=flags;
|
||||||
cmpop:=false;
|
cmpop:=false;
|
||||||
@ -1284,7 +1284,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.15 1998-10-08 17:17:10 pierre
|
Revision 1.16 1998-10-09 08:56:21 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.15 1998/10/08 17:17:10 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)
|
||||||
|
@ -789,6 +789,8 @@ implementation
|
|||||||
p^.methodpointer^.location.loc:=LOC_REGISTER;
|
p^.methodpointer^.location.loc:=LOC_REGISTER;
|
||||||
p^.methodpointer^.location.register:=R_ESI;
|
p^.methodpointer^.location.register:=R_ESI;
|
||||||
p^.methodpointer^.resulttype:=p^.symtable^.defowner;
|
p^.methodpointer^.resulttype:=p^.symtable^.defowner;
|
||||||
|
{ change dispose type !! }
|
||||||
|
p^.disposetyp:=dt_mbleft_and_method;
|
||||||
{ make a reference }
|
{ make a reference }
|
||||||
new(r);
|
new(r);
|
||||||
reset_reference(r^);
|
reset_reference(r^);
|
||||||
@ -1457,7 +1459,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.33 1998-10-06 17:16:39 pierre
|
Revision 1.34 1998-10-09 08:56:22 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.33 1998/10/06 17:16:39 pierre
|
||||||
* some memory leaks fixed (thanks to Peter for heaptrc !)
|
* some memory leaks fixed (thanks to Peter for heaptrc !)
|
||||||
|
|
||||||
Revision 1.32 1998/10/01 09:22:52 peter
|
Revision 1.32 1998/10/01 09:22:52 peter
|
||||||
|
@ -73,6 +73,7 @@ implementation
|
|||||||
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,newreference(p^.left^.location.reference),
|
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,newreference(p^.left^.location.reference),
|
||||||
hreg1)));
|
hreg1)));
|
||||||
end;
|
end;
|
||||||
|
clear_location(p^.left^.location);
|
||||||
p^.left^.location.loc:=LOC_REGISTER;
|
p^.left^.location.loc:=LOC_REGISTER;
|
||||||
p^.left^.location.register:=hreg1;
|
p^.left^.location.register:=hreg1;
|
||||||
end
|
end
|
||||||
@ -171,6 +172,7 @@ implementation
|
|||||||
{ this registers are always used when div/mod are present }
|
{ this registers are always used when div/mod are present }
|
||||||
usedinproc:=usedinproc or ($80 shr byte(R_EAX));
|
usedinproc:=usedinproc or ($80 shr byte(R_EAX));
|
||||||
usedinproc:=usedinproc or ($80 shr byte(R_EDX));
|
usedinproc:=usedinproc or ($80 shr byte(R_EDX));
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hreg1;
|
p^.location.register:=hreg1;
|
||||||
end;
|
end;
|
||||||
@ -559,7 +561,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1998-09-17 09:42:17 peter
|
Revision 1.8 1998-10-09 08:56:24 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.7 1998/09/17 09:42:17 peter
|
||||||
+ pass_2 for cg386
|
+ pass_2 for cg386
|
||||||
* Message() -> CGMessage() for pass_1/pass_2
|
* Message() -> CGMessage() for pass_1/pass_2
|
||||||
|
|
||||||
|
@ -422,6 +422,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if (p^.right^.location.loc in [LOC_MEM,LOC_REFERENCE]) then
|
||||||
|
ungetiftemp(p^.right^.location.reference);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -785,7 +787,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.18 1998-10-08 17:17:14 pierre
|
Revision 1.19 1998-10-09 08:56:25 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.18 1998/10/08 17:17:14 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)
|
||||||
|
@ -319,7 +319,8 @@ unit files;
|
|||||||
begin
|
begin
|
||||||
Freemem(buf,maxbufsize);
|
Freemem(buf,maxbufsize);
|
||||||
buf:=nil;
|
buf:=nil;
|
||||||
is_macro:=false;
|
{is_macro:=false;
|
||||||
|
still needed for dispose in scanner PM }
|
||||||
closed:=true;
|
closed:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -1006,7 +1007,10 @@ unit files;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.55 1998-10-08 23:28:54 peter
|
Revision 1.56 1998-10-09 08:56:26 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.55 1998/10/08 23:28:54 peter
|
||||||
* -vu shows unit info, -vt shows tried/used files
|
* -vu shows unit info, -vt shows tried/used files
|
||||||
|
|
||||||
Revision 1.54 1998/10/08 17:17:19 pierre
|
Revision 1.54 1998/10/08 17:17:19 pierre
|
||||||
|
@ -721,7 +721,8 @@ unit pmodules;
|
|||||||
if current_module^.compiled then
|
if current_module^.compiled then
|
||||||
begin
|
begin
|
||||||
{ this unit symtable is obsolete }
|
{ this unit symtable is obsolete }
|
||||||
dispose(unitst,done);
|
{ dispose(unitst,done);
|
||||||
|
disposed as localsymtable !! }
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
unitst^.symtabletype:=globalsymtable;
|
unitst^.symtabletype:=globalsymtable;
|
||||||
@ -786,13 +787,6 @@ unit pmodules;
|
|||||||
|
|
||||||
if current_module^.compiled then
|
if current_module^.compiled then
|
||||||
begin
|
begin
|
||||||
{ this unit symtable is obsolete }
|
|
||||||
dispose(unitst,done);
|
|
||||||
{ avoid self recursive destructor call !! PM }
|
|
||||||
aktprocsym^.definition^.localst:=nil;
|
|
||||||
{ absence does not matter here !! }
|
|
||||||
aktprocsym^.definition^.forwarddef:=false;
|
|
||||||
dispose(st,done);
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1076,7 +1070,10 @@ unit pmodules;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.63 1998-10-08 23:29:01 peter
|
Revision 1.64 1998-10-09 08:56:28 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.63 1998/10/08 23:29:01 peter
|
||||||
* -vu shows unit info, -vt shows tried/used files
|
* -vu shows unit info, -vt shows tried/used files
|
||||||
|
|
||||||
Revision 1.62 1998/10/08 17:17:25 pierre
|
Revision 1.62 1998/10/08 17:17:25 pierre
|
||||||
|
@ -391,6 +391,7 @@ unit ptconst;
|
|||||||
else if is_constcharnode(p) then
|
else if is_constcharnode(p) then
|
||||||
s:=char(byte(p^.value))
|
s:=char(byte(p^.value))
|
||||||
else Message(cg_e_illegal_expression);
|
else Message(cg_e_illegal_expression);
|
||||||
|
disposetree(p);
|
||||||
l:=length(s);
|
l:=length(s);
|
||||||
for i:=Parraydef(def)^.lowrange to Parraydef(def)^.highrange do
|
for i:=Parraydef(def)^.lowrange to Parraydef(def)^.highrange do
|
||||||
begin
|
begin
|
||||||
@ -511,7 +512,10 @@ unit ptconst;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 1998-09-24 23:49:18 peter
|
Revision 1.17 1998-10-09 08:56:29 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.16 1998/09/24 23:49:18 peter
|
||||||
+ aktmodeswitches
|
+ aktmodeswitches
|
||||||
|
|
||||||
Revision 1.15 1998/09/07 18:46:11 peter
|
Revision 1.15 1998/09/07 18:46:11 peter
|
||||||
|
@ -137,7 +137,7 @@ implementation
|
|||||||
|
|
||||||
const
|
const
|
||||||
{ use any special name that is an invalid file name to avoid problems }
|
{ use any special name that is an invalid file name to avoid problems }
|
||||||
macro_special_name = '__##&&Macro&&##__';
|
macro_special_name = '____Macro____';
|
||||||
|
|
||||||
procedure create_tokenidx;
|
procedure create_tokenidx;
|
||||||
{ create an index with the first and last token for every possible token
|
{ create an index with the first and last token for every possible token
|
||||||
@ -1449,7 +1449,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.59 1998-10-08 23:29:05 peter
|
Revision 1.60 1998-10-09 08:56:31 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.59 1998/10/08 23:29:05 peter
|
||||||
* -vu shows unit info, -vt shows tried/used files
|
* -vu shows unit info, -vt shows tried/used files
|
||||||
|
|
||||||
Revision 1.58 1998/10/08 17:17:30 pierre
|
Revision 1.58 1998/10/08 17:17:30 pierre
|
||||||
|
@ -95,9 +95,7 @@ unit temp_gen;
|
|||||||
{$endif}
|
{$endif}
|
||||||
hp:=templist;
|
hp:=templist;
|
||||||
templist:=hp^.next;
|
templist:=hp^.next;
|
||||||
{$ifndef EXTDEBUG}
|
|
||||||
dispose(hp);
|
dispose(hp);
|
||||||
{$endif not EXTDEBUG}
|
|
||||||
end;
|
end;
|
||||||
templist:=nil;
|
templist:=nil;
|
||||||
tmpfreelist:=nil;
|
tmpfreelist:=nil;
|
||||||
@ -183,7 +181,7 @@ unit temp_gen;
|
|||||||
tl^.persistant:=false;
|
tl^.persistant:=false;
|
||||||
templist:=tl;
|
templist:=tl;
|
||||||
{$ifdef EXTDEBUG}
|
{$ifdef EXTDEBUG}
|
||||||
tl^.line:=current_scanner^.line_no;
|
tl^.line:=aktfilepos.line;
|
||||||
{$endif}
|
{$endif}
|
||||||
gettempofsize:=ofs;
|
gettempofsize:=ofs;
|
||||||
end;
|
end;
|
||||||
@ -451,7 +449,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 1998-07-16 08:01:42 pierre
|
Revision 1.4 1998-10-09 08:56:32 pierre
|
||||||
|
* several memory leaks fixed
|
||||||
|
|
||||||
|
Revision 1.3 1998/07/16 08:01:42 pierre
|
||||||
* small bug correction due to newinput
|
* small bug correction due to newinput
|
||||||
(only with tempdebug conditionnal)
|
(only with tempdebug conditionnal)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user