[pypy-commit] pypy win64_gborg: merge

ctismer noreply at buildbot.pypy.org
Thu Nov 10 13:11:26 CET 2011


Author: Christian Tismer <tismer at stackless.com>
Branch: win64_gborg
Changeset: r49131:60550d8ee39f
Date: 2011-11-10 13:10 +0100
http://bitbucket.org/pypy/pypy/changeset/60550d8ee39f/

Log:	merge

diff --git a/pypy/jit/backend/llsupport/descr.py b/pypy/jit/backend/llsupport/descr.py
--- a/pypy/jit/backend/llsupport/descr.py
+++ b/pypy/jit/backend/llsupport/descr.py
@@ -355,6 +355,10 @@
         return False    # unless overridden
 
     def create_call_stub(self, rtyper, RESULT):
+        from pypy.rlib.clibffi import FFI_DEFAULT_ABI
+        assert self.get_call_conv() == FFI_DEFAULT_ABI, (
+            "%r: create_call_stub() with a non-default call ABI" % (self,))
+
         def process(c):
             if c == 'L':
                 assert longlong.supports_longlong
diff --git a/pypy/module/select/test/test_select.py b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -214,11 +214,15 @@
 
     def test_poll(self):
         import select
-        class A(object):
-            def __int__(self):
-                return 3
-        
-        select.poll().poll(A()) # assert did not crash
+        readend, writeend = self.getpair()
+        try:
+            class A(object):
+                def __int__(self):
+                    return readend.fileno()
+            select.poll().poll(A()) # assert did not crash
+        finally:
+            readend.close()
+            writeend.close()
 
 class AppTestSelectWithPipes(_AppTestSelect):
     "Use a pipe to get pairs of file descriptors"
diff --git a/pypy/module/signal/__init__.py b/pypy/module/signal/__init__.py
--- a/pypy/module/signal/__init__.py
+++ b/pypy/module/signal/__init__.py
@@ -20,7 +20,7 @@
         interpleveldefs['pause'] = 'interp_signal.pause'
         interpleveldefs['siginterrupt'] = 'interp_signal.siginterrupt'
 
-    if hasattr(cpy_signal, 'setitimer'):
+    if os.name == 'posix':
         interpleveldefs['setitimer'] = 'interp_signal.setitimer'
         interpleveldefs['getitimer'] = 'interp_signal.getitimer'
         for name in ['ITIMER_REAL', 'ITIMER_VIRTUAL', 'ITIMER_PROF']:
diff --git a/pypy/module/signal/test/test_signal.py b/pypy/module/signal/test/test_signal.py
--- a/pypy/module/signal/test/test_signal.py
+++ b/pypy/module/signal/test/test_signal.py
@@ -1,4 +1,4 @@
-import os, py
+import os, py, sys
 import signal as cpy_signal
 from pypy.conftest import gettestobjspace
 
@@ -264,6 +264,10 @@
 class AppTestItimer:
     spaceconfig = dict(usemodules=['signal'])
 
+    def setup_class(cls):
+        if sys.platform == 'win32':
+            py.test.skip("Unix only")
+
     def test_itimer_real(self):
         import signal
 
diff --git a/pypy/rpython/lltypesystem/rffi.py b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -246,8 +246,14 @@
     wrapper._always_inline_ = True
     # for debugging, stick ll func ptr to that
     wrapper._ptr = funcptr
+    wrapper = func_with_new_name(wrapper, name)
 
-    return func_with_new_name(wrapper, name)
+    if calling_conv != "c":
+        from pypy.rlib.jit import dont_look_inside
+        wrapper = dont_look_inside(wrapper)
+
+    return wrapper
+
 
 class CallbackHolder:
     def __init__(self):
diff --git a/pypy/translator/platform/__init__.py b/pypy/translator/platform/__init__.py
--- a/pypy/translator/platform/__init__.py
+++ b/pypy/translator/platform/__init__.py
@@ -240,10 +240,13 @@
     else:
         host_factory = Linux64
 elif sys.platform == 'darwin':
-    from pypy.translator.platform.darwin import Darwin_i386, Darwin_x86_64
+    from pypy.translator.platform.darwin import Darwin_i386, Darwin_x86_64, Darwin_PowerPC
     import platform
-    assert platform.machine() in ('i386', 'x86_64')
-    if sys.maxint <= 2147483647:
+    assert platform.machine() in ('Power Macintosh', 'i386', 'x86_64')
+
+    if  platform.machine() == 'Power Macintosh':
+        host_factory = Darwin_PowerPC
+    elif sys.maxint <= 2147483647:
         host_factory = Darwin_i386
     else:
         host_factory = Darwin_x86_64
diff --git a/pypy/translator/platform/darwin.py b/pypy/translator/platform/darwin.py
--- a/pypy/translator/platform/darwin.py
+++ b/pypy/translator/platform/darwin.py
@@ -71,6 +71,11 @@
     link_flags = ('-arch', 'i386')
     cflags = ('-arch', 'i386', '-O3', '-fomit-frame-pointer')
 
+class Darwin_PowerPC(Darwin):#xxx fixme, mwp
+    name = "darwin_powerpc"
+    link_flags = ()
+    cflags = ('-O3', '-fomit-frame-pointer')
+
 class Darwin_x86_64(Darwin):
     name = "darwin_x86_64"
     link_flags = ('-arch', 'x86_64')
diff --git a/pypy/translator/platform/test/test_darwin.py b/pypy/translator/platform/test/test_darwin.py
--- a/pypy/translator/platform/test/test_darwin.py
+++ b/pypy/translator/platform/test/test_darwin.py
@@ -7,7 +7,7 @@
     py.test.skip("Darwin only")
 
 from pypy.tool.udir import udir
-from pypy.translator.platform.darwin import Darwin_i386, Darwin_x86_64
+from pypy.translator.platform.darwin import Darwin_i386, Darwin_x86_64, Darwin_PowerPC
 from pypy.translator.platform.test.test_platform import TestPlatform as BasicTest
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 
@@ -17,7 +17,7 @@
     else:
         host_factory = Darwin_x86_64
 else:
-    host_factory = Darwin
+    host_factory = Darwin_PowerPC
 
 class TestDarwin(BasicTest):
     platform = host_factory()


More information about the pypy-commit mailing list