Browse Source

+ implementation for tasmnode.getcopy

Jonas Maebe 25 years ago
parent
commit
c3025eb50b
1 changed files with 19 additions and 1 deletions
  1. 19 1
      compiler/nbas.pas

+ 19 - 1
compiler/nbas.pas

@@ -45,6 +45,7 @@ interface
           p_asm : paasmoutput;
           p_asm : paasmoutput;
           constructor create(p : paasmoutput);virtual;
           constructor create(p : paasmoutput);virtual;
           destructor destroy;override;
           destructor destroy;override;
+          function getcopy : tnode;override;
           function pass_1 : tnode;override;
           function pass_1 : tnode;override;
        end;
        end;
 
 
@@ -319,6 +320,20 @@ implementation
         inherited destroy;
         inherited destroy;
       end;
       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;
     function tasmnode.pass_1 : tnode;
       begin
       begin
          pass_1:=nil;
          pass_1:=nil;
@@ -334,7 +349,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $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
     * fixed memory leaks
 
 
   Revision 1.1  2000/10/14 10:14:50  peter
   Revision 1.1  2000/10/14 10:14:50  peter