[pypy-svn] r73834 - pypy/trunk/pypy/interpreter

benjamin at codespeak.net benjamin at codespeak.net
Sat Apr 17 20:36:58 CEST 2010


Author: benjamin
Date: Sat Apr 17 20:36:56 2010
New Revision: 73834

Modified:
   pypy/trunk/pypy/interpreter/function.py
   pypy/trunk/pypy/interpreter/gateway.py
Log:
only check for duplicate ids during translation

Modified: pypy/trunk/pypy/interpreter/function.py
==============================================================================
--- pypy/trunk/pypy/interpreter/function.py	(original)
+++ pypy/trunk/pypy/interpreter/function.py	Sat Apr 17 20:36:56 2010
@@ -237,6 +237,8 @@
         if isinstance(self.code, BuiltinCode):
             # we have been seen by other means so rtyping should not choke
             # on us
+            assert self.code.identitifer not in Function._all, ("duplicate "
+                                                                "function ids")
             Function._all[self.code.identifier] = self
         return False
 

Modified: pypy/trunk/pypy/interpreter/gateway.py
==============================================================================
--- pypy/trunk/pypy/interpreter/gateway.py	(original)
+++ pypy/trunk/pypy/interpreter/gateway.py	Sat Apr 17 20:36:56 2010
@@ -801,8 +801,6 @@
         defs = gateway._getdefaults(space) # needs to be implemented by subclass
         code = gateway._code
         fn = FunctionWithFixedCode(space, code, None, defs, forcename = gateway.name)
-        if not space.config.translating: # for tests and py.py
-            fn._freeze_()
         if gateway.as_classmethod:
             fn = ClassMethod(space.wrap(fn))
         return fn



More information about the Pypy-commit mailing list