Selaa lähdekoodia

* don't generate debug info for class fields in generic types
-> fixes failed compilation of webtbs/25600 with debug info
(broken since 6 June, possibly because of r27874)
* don't allocate class fields defined in generic types, as the
only reason for this was to have valid debug info

git-svn-id: trunk@27928 -

Jonas Maebe 11 vuotta sitten
vanhempi
commit
145e9c1aae
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 3 1
      compiler/dbgbase.pas
  2. 2 4
      compiler/pdecvar.pas

+ 3 - 1
compiler/dbgbase.pas

@@ -418,7 +418,9 @@ implementation
         beforeappendsym(list,sym);
         case sym.typ of
           staticvarsym :
-            appendsym_staticvar(list,tstaticvarsym(sym));
+            if not assigned(tstaticvarsym(sym).fieldvarsym) or
+               not(df_generic in tdef(tstaticvarsym(sym).fieldvarsym.owner.defowner).defoptions) then
+              appendsym_staticvar(list,tstaticvarsym(sym));
           unitsym:
             appendsym_unit(list,tunitsym(sym));
           labelsym :

+ 2 - 4
compiler/pdecvar.pas

@@ -1797,10 +1797,8 @@ implementation
                      fieldvs:=tfieldvarsym(sc[i]);
                      fieldvs.visibility:=visibility;
                      hstaticvs:=make_field_static(recst,fieldvs);
-                     { for generics it would be better to disable the following,
-                       but simply disabling it in that case breaks linking with
-                       debug info }
-                     cnodeutils.insertbssdata(hstaticvs);
+                     if not parse_generic then
+                       cnodeutils.insertbssdata(hstaticvs);
                      if vd_final in options then
                        hstaticvs.varspez:=vs_final;
                    end;