[pypy-svn] r55365 - in pypy/branch/gc+thread/pypy/rpython: . lltypesystem lltypesystem/test
arigo at codespeak.net
arigo at codespeak.net
Wed May 28 19:45:18 CEST 2008
Author: arigo
Date: Wed May 28 19:45:15 2008
New Revision: 55365
Modified:
pypy/branch/gc+thread/pypy/rpython/llinterp.py
pypy/branch/gc+thread/pypy/rpython/lltypesystem/llheap.py
pypy/branch/gc+thread/pypy/rpython/lltypesystem/rffi.py
pypy/branch/gc+thread/pypy/rpython/lltypesystem/test/test_rffi.py
Log:
Mostly fixes for tests.
Modified: pypy/branch/gc+thread/pypy/rpython/llinterp.py
==============================================================================
--- pypy/branch/gc+thread/pypy/rpython/llinterp.py (original)
+++ pypy/branch/gc+thread/pypy/rpython/llinterp.py Wed May 28 19:45:15 2008
@@ -774,6 +774,9 @@
addr = llmemory.cast_ptr_to_adr(ptr)
return self.heap.can_move(addr)
+ def op_gc_thread_prepare(self):
+ self.heap.thread_prepare()
+
def op_gc_thread_run(self):
self.heap.thread_run()
Modified: pypy/branch/gc+thread/pypy/rpython/lltypesystem/llheap.py
==============================================================================
--- pypy/branch/gc+thread/pypy/rpython/lltypesystem/llheap.py (original)
+++ pypy/branch/gc+thread/pypy/rpython/lltypesystem/llheap.py Wed May 28 19:45:15 2008
@@ -35,6 +35,9 @@
ll_str.chars[i] = buf.chars[i]
return ll_str
+def thread_prepare():
+ pass
+
def thread_run():
pass
Modified: pypy/branch/gc+thread/pypy/rpython/lltypesystem/rffi.py
==============================================================================
--- pypy/branch/gc+thread/pypy/rpython/lltypesystem/rffi.py (original)
+++ pypy/branch/gc+thread/pypy/rpython/lltypesystem/rffi.py Wed May 28 19:45:15 2008
@@ -163,9 +163,12 @@
return cast(lltype.Unsigned, res)
return res
wrapper._annspecialcase_ = 'specialize:ll'
- # don't inline, as a hack to guarantee that no GC pointer is alive
- # in the final part of the wrapper
- wrapper._dont_inline_ = True
+ if invoke_around_handlers:
+ # don't inline, as a hack to guarantee that no GC pointer is alive
+ # in the final part of the wrapper
+ wrapper._dont_inline_ = True
+ else:
+ wrapper._always_inline_ = True
# for debugging, stick ll func ptr to that
wrapper._ptr = funcptr
Modified: pypy/branch/gc+thread/pypy/rpython/lltypesystem/test/test_rffi.py
==============================================================================
--- pypy/branch/gc+thread/pypy/rpython/lltypesystem/test/test_rffi.py (original)
+++ pypy/branch/gc+thread/pypy/rpython/lltypesystem/test/test_rffi.py Wed May 28 19:45:15 2008
@@ -531,7 +531,8 @@
assert interpret(f, []) == 3
def test_implicit_cast(self):
- z = llexternal('z', [USHORT, ULONG, USHORT, DOUBLE], USHORT)
+ z = llexternal('z', [USHORT, ULONG, USHORT, DOUBLE], USHORT,
+ sandboxsafe=True) # to allow the wrapper to be inlined
def f(x, y, xx, yy):
return z(x, y, xx, yy)
More information about the Pypy-commit
mailing list