浏览代码

* use a_call_reg
* ungetiftemp for procvar of object temp

peter 23 年之前
父节点
当前提交
a06f84daf8
共有 2 个文件被更改,包括 16 次插入20 次删除
  1. 8 10
      compiler/i386/n386cal.pas
  2. 8 10
      compiler/ncgcal.pas

+ 8 - 10
compiler/i386/n386cal.pas

@@ -1043,20 +1043,14 @@ implementation
                    if hregister<>R_NO then
                      cg.free_scratch_reg(exprasmlist,hregister);
                    reference_release(exprasmlist,right.location.reference);
+                   tg.Ungetiftemp(exprasmlist,right.location.reference);
                 end
               else
                 begin
                    rg.saveregvars(exprasmlist,ALL_REGISTERS);
-                   case right.location.loc of
-                      LOC_REGISTER,LOC_CREGISTER:
-                        reference_reset_base(href,right.location.register,0);
-                      LOC_REFERENCE,LOC_CREFERENCE :
-                        href:=right.location.reference;
-                      else
-                        internalerror(200203311);
-                   end;
-                   cg.a_call_ref(exprasmlist,href);
+                   cg.a_call_loc(exprasmlist,right.location);
                    location_release(exprasmlist,right.location);
+                   location_freetemp(exprasmlist,right.location);
                 end;
            end;
 
@@ -1314,7 +1308,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.67  2002-08-25 19:25:21  peter
+  Revision 1.68  2002-09-01 12:13:00  peter
+    * use a_call_reg
+    * ungetiftemp for procvar of object temp
+
+  Revision 1.67  2002/08/25 19:25:21  peter
     * sym.insert_in_data removed
     * symtable.insertvardata/insertconstdata added
     * removed insert_in_data call from symtable.insert, it needs to be

+ 8 - 10
compiler/ncgcal.pas

@@ -1022,20 +1022,14 @@ implementation
                    if hregister<>R_NO then
                      cg.free_scratch_reg(exprasmlist,hregister);
                    reference_release(exprasmlist,right.location.reference);
+                   tg.Ungetiftemp(exprasmlist,right.location.reference);
                 end
               else
                 begin
                    rg.saveregvars(exprasmlist,ALL_REGISTERS);
-                   case right.location.loc of
-                      LOC_REGISTER,LOC_CREGISTER:
-                        reference_reset_base(href,right.location.register,0);
-                      LOC_REFERENCE,LOC_CREFERENCE :
-                        href:=right.location.reference;
-                      else
-                        internalerror(200203311);
-                   end;
-                   cg.a_call_ref(exprasmlist,href);
+                   cg.a_call_loc(exprasmlist,right.location);
                    location_release(exprasmlist,right.location);
+                   location_freetemp(exprasmlist,right.location);
                 end;
            end;
 {$endif dummy}
@@ -1475,7 +1469,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.16  2002-08-25 19:25:18  peter
+  Revision 1.17  2002-09-01 12:13:00  peter
+    * use a_call_reg
+    * ungetiftemp for procvar of object temp
+
+  Revision 1.16  2002/08/25 19:25:18  peter
     * sym.insert_in_data removed
     * symtable.insertvardata/insertconstdata added
     * removed insert_in_data call from symtable.insert, it needs to be