فهرست منبع

* force objects and records only into memory if their address is passed, hint from Jonas, improves code after r29139

git-svn-id: trunk@29344 -
florian 10 سال پیش
والد
کامیت
1178fdc98f
1فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 6 5
      compiler/ncgcal.pas

+ 6 - 5
compiler/ncgcal.pas

@@ -325,12 +325,13 @@ implementation
                      paramanager.push_addr_param(parasym.varspez,parasym.vardef,
                          aktcallnode.procdefinition.proccalloption));
 
-                 { objects or advanced records could be located in registers if they are the result of a type case, see e.g. webtbs\tw26075.pp }
-                 if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then
-                   hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef);
-
                  if pushaddr then
-                   push_addr_para
+                   begin
+                     { objects or advanced records could be located in registers if they are the result of a type case, see e.g. webtbs\tw26075.pp }
+                     if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then
+                       hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef);
+                     push_addr_para
+                   end
                  else
                    push_value_para;
                end