瀏覽代碼

* decrrefcount resets temps to nil

peter 22 年之前
父節點
當前提交
fa9e45b7cb
共有 2 個文件被更改,包括 13 次插入3 次删除
  1. 7 1
      compiler/cgobj.pas
  2. 6 2
      compiler/options.pas

+ 7 - 1
compiler/cgobj.pas

@@ -1625,6 +1625,9 @@ implementation
             a_call_name(list,'FPC_DECREF');
             a_call_name(list,'FPC_DECREF');
             deallocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
             deallocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
          end;
          end;
+        { Temp locations need always to be reset to 0 }
+        if tg.istemp(ref) then
+          a_load_const_ref(list,OS_ADDR,0,ref);
       end;
       end;
 
 
 
 
@@ -2109,7 +2112,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.150  2004-01-21 21:01:34  peter
+  Revision 1.151  2004-01-21 22:13:20  peter
+    * decrrefcount resets temps to nil
+
+  Revision 1.150  2004/01/21 21:01:34  peter
     * fixed stackchecking for register calling
     * fixed stackchecking for register calling
 
 
   Revision 1.149  2004/01/20 12:59:36  florian
   Revision 1.149  2004/01/20 12:59:36  florian

+ 6 - 2
compiler/options.pas

@@ -1689,7 +1689,8 @@ begin
   def_symbol('NOCLASSHELPERS');
   def_symbol('NOCLASSHELPERS');
   if pocall_default = pocall_register then
   if pocall_default = pocall_register then
     def_symbol('REGCALL');
     def_symbol('REGCALL');
-
+  def_symbol('DECRREFNOTNIL');
+  
 { using a case is pretty useless here (FK) }
 { using a case is pretty useless here (FK) }
 { some stuff for TP compatibility }
 { some stuff for TP compatibility }
 {$ifdef i386}
 {$ifdef i386}
@@ -1994,7 +1995,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.120  2004-01-10 00:16:21  jonas
+  Revision 1.121  2004-01-21 22:13:20  peter
+    * decrrefcount resets temps to nil
+
+  Revision 1.120  2004/01/10 00:16:21  jonas
     * fixed mtfsb0 instruction for assembler reader/writer
     * fixed mtfsb0 instruction for assembler reader/writer
     * fixed initialisation of fpscr register to avoid spurious SIGPFE's
     * fixed initialisation of fpscr register to avoid spurious SIGPFE's
       (uses mtfsb0 instruction, so added extra define in options.pas to avoid
       (uses mtfsb0 instruction, so added extra define in options.pas to avoid