[pypy-svn] r64635 - pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph

antocuni at codespeak.net antocuni at codespeak.net
Fri Apr 24 12:47:47 CEST 2009


Author: antocuni
Date: Fri Apr 24 12:47:46 2009
New Revision: 64635

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py
Log:
oops, MethDescr is not an OODescr


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py	Fri Apr 24 12:47:46 2009
@@ -535,18 +535,18 @@
             return n
 
 
+descr_cache = {}
 class OODescr(history.AbstractDescr):
-    _cache = {}
 
     @classmethod
     def new(cls, *args):
         'NOT_RPYTHON'
         key = (cls, args)
         try:
-            return cls._cache[key]
+            return descr_cache[key]
         except KeyError:
             res = cls(*args)
-            cls._cache[key] = res
+            descr_cache[key] = res
             return res
 
 class StaticMethDescr(OODescr):
@@ -564,6 +564,8 @@
 
 class MethDescr(history.AbstractMethDescr):
 
+    new = classmethod(OODescr.new.im_func)
+
     def __init__(self, SELFTYPE, methname):
         _, meth = SELFTYPE._lookup(methname)
         METH = ootype.typeOf(meth)



More information about the Pypy-commit mailing list