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

tismer at codespeak.net tismer at codespeak.net
Tue Mar 28 02:08:23 CEST 2006


Author: tismer
Date: Tue Mar 28 02:08:21 2006
New Revision: 25055

Modified:
   pypy/dist/pypy/rpython/rtyper.py
Log:
registry for classdefs which need to grow a wrapper

Modified: pypy/dist/pypy/rpython/rtyper.py
==============================================================================
--- pypy/dist/pypy/rpython/rtyper.py	(original)
+++ pypy/dist/pypy/rpython/rtyper.py	Tue Mar 28 02:08:21 2006
@@ -56,6 +56,7 @@
         self.class_reprs = {}
         self.instance_reprs = {}
         self.pbc_reprs = {}
+        self.classdefs_with_wrapper = {}
         self.concrete_calltables = {}
         self.class_pbc_attributes = {}
         self.oo_meth_impls = {}
@@ -87,6 +88,9 @@
             log.info(s)
         self.crash_on_first_typeerror = True
 
+    def add_wrapper(self, clsdef):
+        self.classdefs_with_wrapper[clsdef] = clsdef
+
     def add_pendingsetup(self, repr): 
         assert isinstance(repr, Repr)
         if repr in self._seen_reprs_must_call_setup: 
@@ -531,6 +535,9 @@
     def needs_hash_support(self, clsdef):
         return clsdef in self.annotator.bookkeeper.needs_hash_support
 
+    def needs_wrapper(self, clsdef):
+        return clsdef in self.classdefs_with_wrapper
+
     def getcallable(self, graph):
         def getconcretetype(v):
             return self.bindingrepr(v).lowleveltype



More information about the Pypy-commit mailing list