Kaynağa Gözat

* varsym refs incremented

pierre 26 yıl önce
ebeveyn
işleme
f8395f4a48
2 değiştirilmiş dosya ile 14 ekleme ve 2 silme
  1. 6 1
      compiler/ra386dir.pas
  2. 8 1
      compiler/rautils.pas

+ 6 - 1
compiler/ra386dir.pas

@@ -214,6 +214,8 @@ unit Ra386dir;
                                                   begin
                                                      Do_comment(V_Warning,hs+' translated to '+sym^.mangledname);
                                                      hs:=sym^.mangledname;
+                                                     if sym^.typ=varsym then
+                                                       inc(pvarsym(sym)^.refs);
                                                   end;
                                                 { procs can be called or the address can be loaded }
                                                 if (sym^.typ=procsym) and ((pos('CALL',upper(s))>0) or
@@ -294,7 +296,10 @@ unit Ra386dir;
 end.
 {
   $Log$
-  Revision 1.14  1999-02-22 02:15:36  peter
+  Revision 1.15  1999-03-01 13:22:26  pierre
+   * varsym refs incremented
+
+  Revision 1.14  1999/02/22 02:15:36  peter
     * updates for ag386bin
 
   Revision 1.13  1999/01/27 13:04:12  pierre

+ 8 - 1
compiler/rautils.pas

@@ -1344,6 +1344,7 @@ end;
                     { we always assume in asm statements that     }
                     { that the variable is valid.                 }
                     pvarsym(sym)^.is_valid:=1;
+                    inc(pvarsym(sym)^.refs);
                     if pvarsym(sym)^.owner^.symtabletype=staticsymtable then
                      begin
                        instr.operands[operandnum].ref.symbol:=newasmsymbol(pvarsym(sym)^.mangledname);
@@ -1448,6 +1449,7 @@ end;
                        inc(l,aktprocsym^.definition^.parast^.call_offset);
                      end;
                     pvarsym(sym)^.is_valid:=1;
+                    inc(pvarsym(sym)^.refs);
                     instr.operands[operandnum].ref.base := procinfo.framepointer;
                     instr.operands[operandnum].ref.offset := l;
                     { the current size is NOT overriden if it already }
@@ -1487,6 +1489,8 @@ end;
        case sym^.typ of
           varsym,
    typedconstsym : Begin
+                     if sym^.typ=varsym then
+                       inc(pvarsym(sym)^.refs);
                      instr.operands[operandnum].ref.symbol:=newasmsymbol(sym^.mangledname);
                    { the current size is NOT overriden if it already }
                    { exists, such as in the case of a byte ptr, in   }
@@ -1786,7 +1790,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.5  1999-02-25 21:02:51  peter
+  Revision 1.6  1999-03-01 13:22:25  pierre
+   * varsym refs incremented
+
+  Revision 1.5  1999/02/25 21:02:51  peter
     * ag386bin updates
     + coff writer