فهرست منبع

* no refcount needed for all constants instead of only stringconst

git-svn-id: trunk@8426 -
peter 18 سال پیش
والد
کامیت
6b8a5e56b6
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      compiler/ncgld.pas

+ 2 - 2
compiler/ncgld.pas

@@ -530,9 +530,9 @@ implementation
          begin
          begin
            secondpass(right);
            secondpass(right);
            { increment source reference counter, this is
            { increment source reference counter, this is
-             useless for string constants}
+             useless for constants }
            if (right.resultdef.needs_inittable) and
            if (right.resultdef.needs_inittable) and
-              (right.nodetype<>stringconstn) then
+              not is_constnode(right) then
             begin
             begin
               location_force_mem(current_asmdata.CurrAsmList,right.location);
               location_force_mem(current_asmdata.CurrAsmList,right.location);
               location_get_data_ref(current_asmdata.CurrAsmList,right.location,href,false);
               location_get_data_ref(current_asmdata.CurrAsmList,right.location,href,false);