[pypy-commit] pypy rtyper-stuff: fix
rlamy
noreply at buildbot.pypy.org
Wed Oct 8 05:07:50 CEST 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: rtyper-stuff
Changeset: r73838:7a0aa5c59924
Date: 2014-10-08 04:06 +0100
http://bitbucket.org/pypy/pypy/changeset/7a0aa5c59924/
Log: fix
diff --git a/rpython/rlib/_stacklet_n_a.py b/rpython/rlib/_stacklet_n_a.py
--- a/rpython/rlib/_stacklet_n_a.py
+++ b/rpython/rlib/_stacklet_n_a.py
@@ -1,16 +1,17 @@
from rpython.rlib import _rffi_stacklet as _c
-from rpython.rlib import objectmodel, debug
+from rpython.rlib import debug
+from rpython.rlib.objectmodel import we_are_translated, specialize
from rpython.rtyper.annlowlevel import llhelper
class StackletGcRootFinder(object):
@staticmethod
+ @specialize.arg(1)
def new(thrd, callback, arg):
h = _c.new(thrd._thrd, llhelper(_c.run_fn, callback), arg)
if not h:
raise MemoryError
return h
- new._annspecialcase_ = 'specialize:arg(1)'
@staticmethod
def switch(h):
@@ -22,7 +23,7 @@
@staticmethod
def destroy(thrd, h):
_c.destroy(thrd._thrd, h)
- if objectmodel.we_are_translated():
+ if we_are_translated():
debug.debug_print("not using a framework GC: "
"stacklet_destroy() may leak")
diff --git a/rpython/rlib/_stacklet_shadowstack.py b/rpython/rlib/_stacklet_shadowstack.py
--- a/rpython/rlib/_stacklet_shadowstack.py
+++ b/rpython/rlib/_stacklet_shadowstack.py
@@ -68,7 +68,6 @@
class StackletGcRootFinder(object):
- @staticmethod
def new(thrd, callback, arg):
gcrootfinder.callback = callback
thread_handle = thrd._thrd
@@ -76,8 +75,8 @@
h = _c.new(thread_handle, llhelper(_c.run_fn, _new_callback), arg)
return get_result_suspstack(h)
new._dont_inline_ = True
+ new = staticmethod(new)
- @staticmethod
def switch(suspstack):
# suspstack has a handle to target, i.e. where to switch to
ll_assert(suspstack != gcrootfinder.oldsuspstack,
@@ -89,6 +88,7 @@
h = _c.switch(h)
return get_result_suspstack(h)
switch._dont_inline_ = True
+ switch = staticmethod(switch)
@staticmethod
def is_empty_handle(suspstack):
More information about the pypy-commit
mailing list