From c3025eb50bf6363c1fb6007c8e0e1397f641659f Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 27 Oct 2000 14:57:16 +0000 Subject: [PATCH] + implementation for tasmnode.getcopy --- compiler/nbas.pas | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/compiler/nbas.pas b/compiler/nbas.pas index 13c0ec3c97..cd97f53664 100644 --- a/compiler/nbas.pas +++ b/compiler/nbas.pas @@ -45,6 +45,7 @@ interface p_asm : paasmoutput; constructor create(p : paasmoutput);virtual; destructor destroy;override; + function getcopy : tnode;override; function pass_1 : tnode;override; end; @@ -319,6 +320,20 @@ implementation inherited destroy; end; + function tasmnode.getcopy: tnode; + var + n: tasmnode; + begin + n := tasmnode(inherited getcopy); + if assigned(p_asm) then + begin + new(n.p_asm,init); + n.p_asm^.concatlistcopy(p_asm); + end + else n.p_asm := nil; + getcopy := n; + end; + function tasmnode.pass_1 : tnode; begin pass_1:=nil; @@ -334,7 +349,10 @@ begin end. { $Log$ - Revision 1.2 2000-10-14 21:52:54 peter + Revision 1.3 2000-10-27 14:57:16 jonas + + implementation for tasmnode.getcopy + + Revision 1.2 2000/10/14 21:52:54 peter * fixed memory leaks Revision 1.1 2000/10/14 10:14:50 peter