[pypy-svn] r77379 - pypy/branch/jit-str/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Sun Sep 26 14:06:35 CEST 2010


Author: arigo
Date: Sun Sep 26 14:06:33 2010
New Revision: 77379

Modified:
   pypy/branch/jit-str/pypy/objspace/std/stringtype.py
Log:
Experimental: turn off char sharing under the jit.


Modified: pypy/branch/jit-str/pypy/objspace/std/stringtype.py
==============================================================================
--- pypy/branch/jit-str/pypy/objspace/std/stringtype.py	(original)
+++ pypy/branch/jit-str/pypy/objspace/std/stringtype.py	Sun Sep 26 14:06:33 2010
@@ -4,6 +4,7 @@
 
 from sys import maxint
 from pypy.rlib.objectmodel import specialize
+from pypy.rlib.jit import we_are_jitted
 
 def wrapstr(space, s):
     from pypy.objspace.std.stringobject import W_StringObject
@@ -32,7 +33,7 @@
 def wrapchar(space, c):
     from pypy.objspace.std.stringobject import W_StringObject
     from pypy.objspace.std.ropeobject import rope, W_RopeObject
-    if space.config.objspace.std.withprebuiltchar:
+    if space.config.objspace.std.withprebuiltchar and not we_are_jitted():
         if space.config.objspace.std.withrope:
             return W_RopeObject.PREBUILT[ord(c)]
         return W_StringObject.PREBUILT[ord(c)]



More information about the Pypy-commit mailing list