[pypy-svn] r70921 - in pypy/trunk/pypy: interpreter module/__builtin__/test

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Jan 27 16:01:49 CET 2010


Author: cfbolz
Date: Wed Jan 27 16:01:48 2010
New Revision: 70921

Modified:
   pypy/trunk/pypy/interpreter/pyframe.py
   pypy/trunk/pypy/module/__builtin__/test/test_classobj.py
Log:
After the last commits, class bodies can use a module dict. This makes old-style
classes use a celldict when the JIT is in use, which is a huge improvement over
not optimizing them at all (but not as good as a version_tag of course).


Modified: pypy/trunk/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/trunk/pypy/interpreter/pyframe.py	(original)
+++ pypy/trunk/pypy/interpreter/pyframe.py	Wed Jan 27 16:01:48 2010
@@ -110,7 +110,7 @@
         if flags & pycode.CO_OPTIMIZED: 
             return 
         if flags & pycode.CO_NEWLOCALS:
-            self.w_locals = self.space.newdict(strdict=True)
+            self.w_locals = self.space.newdict(module=True)
         else:
             assert self.w_globals is not None
             self.w_locals = self.w_globals

Modified: pypy/trunk/pypy/module/__builtin__/test/test_classobj.py
==============================================================================
--- pypy/trunk/pypy/module/__builtin__/test/test_classobj.py	(original)
+++ pypy/trunk/pypy/module/__builtin__/test/test_classobj.py	Wed Jan 27 16:01:48 2010
@@ -788,9 +788,8 @@
         assert self.is_sharing(A2)
         assert self.is_sharing(A1)
 
-class AppTestOldStyleStrDict(object):
+class AppTestOldStyleModDict(object):
     def setup_class(cls):
-        cls.space = gettestobjspace()
         if option.runappdirect:
             py.test.skip("can only be run on py.py")
         def is_strdict(space, w_class):



More information about the Pypy-commit mailing list