[pypy-commit] pypy default: merge heads

bivab noreply at buildbot.pypy.org
Mon Apr 8 15:47:01 CEST 2013


Author: David Schneider <david.schneider at picle.org>
Branch: 
Changeset: r63138:417165a0cad6
Date: 2013-04-08 15:46 +0200
http://bitbucket.org/pypy/pypy/changeset/417165a0cad6/

Log:	merge heads

diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py
--- a/lib_pypy/_curses.py
+++ b/lib_pypy/_curses.py
@@ -364,7 +364,9 @@
             key_n = ffi.string(key_n)
             if key_n == b"UNKNOWN KEY":
                 continue
-            key_n = key_n.decode().replace('(', '').replace(')', '')
+            if not isinstance(key_n, str):   # python 3
+                key_n = key_n.decode()
+            key_n = key_n.replace('(', '').replace(')', '')
             globals()[key_n] = key
 
 _setup()
diff --git a/pypy/doc/release-2.0.0-beta2.rst b/pypy/doc/release-2.0.0-beta2.rst
--- a/pypy/doc/release-2.0.0-beta2.rst
+++ b/pypy/doc/release-2.0.0-beta2.rst
@@ -82,3 +82,13 @@
 * we now have special strategies for ``dict``/``set``/``list`` which contain
   unicode strings, which means that now such collections will be both faster
   and more compact.
+
+.. _`eventlet`: http://eventlet.net/
+.. _`gevent`: http://www.gevent.org/
+.. _`cffi`: http://cffi.readthedocs.org/en/release-0.6/
+.. _`JIT hooks`: http://doc.pypy.org/en/latest/jit-hooks.html
+.. _`pypycore`: https://github.com/gevent-on-pypy/pypycore
+.. _`pypy-hacks`: https://github.com/schmir/gevent/tree/pypy-hacks
+.. _`_curses.py`: https://bitbucket.org/pypy/pypy/src/aefddd47f224e3c12e2ea74f5c796d76f4355bdb/lib_pypy/_curses.py?at=default
+.. _`_sqlite3.py`: https://bitbucket.org/pypy/pypy/src/aefddd47f224e3c12e2ea74f5c796d76f4355bdb/lib_pypy/_sqlite3.py?at=default
+
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -709,6 +709,8 @@
 
     def new_interned_w_str(self, w_s):
         s = self.str_w(w_s)
+        if not we_are_translated():
+            assert type(s) is str
         try:
             return self.interned_strings[s]
         except KeyError:
@@ -717,6 +719,8 @@
         return w_s
 
     def new_interned_str(self, s):
+        if not we_are_translated():
+            assert type(s) is str
         try:
             return self.interned_strings[s]
         except KeyError:
diff --git a/pypy/module/_minimal_curses/__init__.py b/pypy/module/_minimal_curses/__init__.py
--- a/pypy/module/_minimal_curses/__init__.py
+++ b/pypy/module/_minimal_curses/__init__.py
@@ -27,6 +27,7 @@
     }
 
 for i in dir(_curses):
+    i = str(i)     # workaround for pypy 2.0-beta2
     val = getattr(_curses, i)
     if i.isupper() and type(val) is int:
         Module.interpleveldefs[i] = "space.wrap(%s)" % val
diff --git a/rpython/translator/c/gcc/test/elf64/track_basic_argument_registers.s b/rpython/translator/c/gcc/test/elf64/track_basic_argument_registers.s
--- a/rpython/translator/c/gcc/test/elf64/track_basic_argument_registers.s
+++ b/rpython/translator/c/gcc/test/elf64/track_basic_argument_registers.s
@@ -25,7 +25,8 @@
 	/* GCROOT -48(%rbp) */
 	movq	-24(%rbp), %rax
 	leave
-	ret
+	; try out a "rep ret" instead of just a "ret", for bad reasons
+	rep ret
 	.cfi_endproc
 .LFE0:
 	.size	foobar, .-foobar
diff --git a/rpython/translator/c/gcc/trackgcroot.py b/rpython/translator/c/gcc/trackgcroot.py
--- a/rpython/translator/c/gcc/trackgcroot.py
+++ b/rpython/translator/c/gcc/trackgcroot.py
@@ -664,6 +664,12 @@
     def visit_ret(self, line):
         return InsnRet(self.CALLEE_SAVE_REGISTERS)
 
+    def visit_rep(self, line):
+        # 'rep ret': bad reasons for this bogus 'rep' here
+        if line.split()[:2] == ['rep', 'ret']:
+            return self.visit_ret(line)
+        return []
+
     def visit_jmp(self, line):
         tablelabels = []
         match = self.r_jmp_switch.match(line)


More information about the pypy-commit mailing list