From 75c443fcf89f184d39a610622c5ea6df153d638f Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 27 Jan 1999 12:57:22 +0000 Subject: [PATCH] * memory leaks with hightree solved by adding a new disposetyp dt_leftrighthigh --- compiler/tree.pas | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/compiler/tree.pas b/compiler/tree.pas index 321fa519ff..3faed9f2f7 100644 --- a/compiler/tree.pas +++ b/compiler/tree.pas @@ -183,7 +183,7 @@ unit tree; {$endif} { allows to determine which elementes are to be replaced } - tdisposetyp = (dt_nothing,dt_leftright,dt_left, + tdisposetyp = (dt_nothing,dt_leftright,dt_left,dt_leftrighthigh, dt_mbleft,dt_typeconv,dt_inlinen, dt_mbleft_and_method,dt_loop,dt_case,dt_with,dt_onn); @@ -406,6 +406,15 @@ unit tree; if assigned(p^.right) then hp^.right:=getcopy(p^.right); end; + dt_leftrighthigh : + begin + if assigned(p^.left) then + hp^.left:=getcopy(p^.left); + if assigned(p^.right) then + hp^.right:=getcopy(p^.right); + if assigned(p^.hightree) then + hp^.left:=getcopy(p^.hightree); + end; dt_nothing : ; dt_left : if assigned(p^.left) then @@ -494,6 +503,15 @@ unit tree; if assigned(p^.right) then disposetree(p^.right); end; + dt_leftrighthigh : + begin + if assigned(p^.left) then + disposetree(p^.left); + if assigned(p^.right) then + disposetree(p^.right); + if assigned(p^.hightree) then + disposetree(p^.hightree); + end; dt_case : begin if assigned(p^.left) then @@ -629,7 +647,7 @@ unit tree; begin p:=getnode; - p^.disposetyp:=dt_leftright; + p^.disposetyp:=dt_leftrighthigh; p^.treetype:=callparan; p^.left:=expr; p^.right:=next; @@ -643,6 +661,7 @@ unit tree; p^.resulttype:=nil; p^.exact_match_found:=false; p^.is_colon_para:=false; + p^.hightree:=nil; set_file_line(expr,p); gencallparanode:=p; end; @@ -1666,7 +1685,11 @@ unit tree; end. { $Log$ - Revision 1.63 1999-01-27 00:14:00 florian + Revision 1.64 1999-01-27 12:57:22 pierre + * memory leaks with hightree solved by adding a new disposetyp + dt_leftrighthigh + + Revision 1.63 1999/01/27 00:14:00 florian * "procedure of object"-stuff fixed Revision 1.62 1999/01/21 22:10:52 peter