2
0
Эх сурвалжийг харах

* ensure that nothing assembly related is generated for generics when a typed constant (this also includes local variable initializations) are parsed

git-svn-id: trunk@43534 -
svenbarth 5 жил өмнө
parent
commit
276f5bdef8
1 өөрчлөгдсөн 19 нэмэгдсэн , 16 устгасан
  1. 19 16
      compiler/ptconst.pas

+ 19 - 16
compiler/ptconst.pas

@@ -123,23 +123,26 @@ implementation
               end;
               end;
           end;
           end;
 
 
-        if vo_is_public in sym.varoptions then
-          current_module.add_public_asmsym(sym.mangledname,AB_GLOBAL,AT_DATA);
-
-        if not(target_info.system in systems_typed_constants_node_init) then
-          begin
-            { only now get the final asmlist, because inserting the symbol
-              information depends on potential section information set above }
-            tasmlisttypedconstbuilder(tcbuilder).get_final_asmlists(reslist,datalist);
-             { add the parsed value }
-            list.concatlist(reslist);
-            { and pointed data, if any }
-            current_asmdata.asmlists[al_const].concatlist(datalist);
-            { the (empty) lists themselves are freed by tcbuilder }
-          end
-        else
+        if not parse_generic then
           begin
           begin
-            { nothing to do }
+            if vo_is_public in sym.varoptions then
+              current_module.add_public_asmsym(sym.mangledname,AB_GLOBAL,AT_DATA);
+
+            if not(target_info.system in systems_typed_constants_node_init) then
+              begin
+                { only now get the final asmlist, because inserting the symbol
+                  information depends on potential section information set above }
+                tasmlisttypedconstbuilder(tcbuilder).get_final_asmlists(reslist,datalist);
+                 { add the parsed value }
+                list.concatlist(reslist);
+                { and pointed data, if any }
+                current_asmdata.asmlists[al_const].concatlist(datalist);
+                { the (empty) lists themselves are freed by tcbuilder }
+              end
+            else
+              begin
+                { nothing to do }
+              end;
           end;
           end;
 
 
         tcbuilder.free;
         tcbuilder.free;