[pypy-svn] r26153 - pypy/dist/pypy/rpython/lltypesystem

tismer at codespeak.net tismer at codespeak.net
Sun Apr 23 03:47:45 CEST 2006


Author: tismer
Date: Sun Apr 23 03:47:43 2006
New Revision: 26153

Modified:
   pypy/dist/pypy/rpython/lltypesystem/rclass.py
Log:
comment on bare_setfield.
What actually would be needed is an operation that writes
into an uninitialized field.

Modified: pypy/dist/pypy/rpython/lltypesystem/rclass.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rclass.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/rclass.py	Sun Apr 23 03:47:43 2006
@@ -611,8 +611,9 @@
         repr = c_spec.value
         if repr.has_wrapper:
             null = hop.inputconst(Ptr(PyObject), nullptr(PyObject))
-            # XXX this is a hack! We need an operation to remove a broken
-            # PyObject
+            # XXX this bare_setfield is needed because we cannot do refcount operations
+            # XXX on a dead object. Actually this is an abuse. Instead,
+            # XXX we should consider a different operation for 'uninitialized fields'
             repr.setfield(v_inst, '_wrapper_', null, hop.llops,
                           opname='bare_setfield')
         hop.genop('gc_unprotect', [v_inst])



More information about the Pypy-commit mailing list