소스 검색

* Reference counts are now properly incremented on duplicated taicpu objects

J. Gareth "Curious Kit" Moreton 3 년 전
부모
커밋
94c87243ca
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      compiler/aasmtai.pas

+ 8 - 0
compiler/aasmtai.pas

@@ -3143,6 +3143,14 @@ implementation
                 begin
                   new(p.oper[i]^.ref);
                   p.oper[i]^.ref^:=oper[i]^.ref^;
+                  if Assigned(p.oper[i]^.ref^.symbol) then
+                    p.oper[i]^.ref^.symbol.increfs;
+                  if Assigned(p.oper[i]^.ref^.relsymbol) then
+                    p.oper[i]^.ref^.relsymbol.increfs;
+{$ifdef jvm}
+                  if Assigned(p.oper[i]^.ref^.indexsymbol) then
+                    p.oper[i]^.ref^.indexsymbol.increfs;
+{$endif jvm}
                 end;
 {$ifdef ARM}
               top_shifterop: