[pypy-svn] r29501 - pypy/dist/pypy/rpython

arigo at codespeak.net arigo at codespeak.net
Thu Jun 29 18:32:12 CEST 2006


Author: arigo
Date: Thu Jun 29 18:32:11 2006
New Revision: 29501

Modified:
   pypy/dist/pypy/rpython/annlowlevel.py
Log:
(arre, pedronis, arigo)

A bug fix.  See comments.



Modified: pypy/dist/pypy/rpython/annlowlevel.py
==============================================================================
--- pypy/dist/pypy/rpython/annlowlevel.py	(original)
+++ pypy/dist/pypy/rpython/annlowlevel.py	Thu Jun 29 18:32:11 2006
@@ -184,6 +184,12 @@
 
     def delayedconst(self, repr, obj):
         if repr.is_setup_delayed():
+            # record the existence of this 'obj' for the bookkeeper - e.g.
+            # if 'obj' is an instance, this will populate the classdef with
+            # the prebuilt attribute values of the instance
+            bk = self.rtyper.annotator.bookkeeper
+            bk.immutablevalue(obj)
+
             delayedptr = lltype._ptr(repr.lowleveltype, "delayed!")
             self.delayedconsts.append((delayedptr, repr, obj))
             return delayedptr



More information about the Pypy-commit mailing list