[pypy-commit] pypy stmgc-c4: Remove clear_exception_data_on_abort() and piggy-back calls
arigo
noreply at buildbot.pypy.org
Sat Sep 7 18:15:54 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c4
Changeset: r66834:a8ad1e23eb92
Date: 2013-09-07 16:34 +0200
http://bitbucket.org/pypy/pypy/changeset/a8ad1e23eb92/
Log: Remove clear_exception_data_on_abort() and piggy-back calls to
stm_clear_on_abort() to stm_initialize().
diff --git a/pypy/module/thread/stm.py b/pypy/module/thread/stm.py
--- a/pypy/module/thread/stm.py
+++ b/pypy/module/thread/stm.py
@@ -18,7 +18,6 @@
def initialize_execution_context(ec):
"""Called from ExecutionContext.__init__()."""
- rstm.clear_exception_data_on_abort()
ec._thread_local_dicts = rweakref.RWeakKeyDictionary(STMLocal, W_Root)
if ec.space.config.objspace.std.withmethodcache:
from pypy.objspace.std.typeobject import MethodCache
diff --git a/rpython/rlib/rstm.py b/rpython/rlib/rstm.py
--- a/rpython/rlib/rstm.py
+++ b/rpython/rlib/rstm.py
@@ -15,25 +15,6 @@
return rffi.cast(lltype.Signed, addr)
@dont_look_inside
-def clear_exception_data_on_abort():
- # XXX: provisional API just to be safe
- # called by pypy/module/thread/stm:initialize_execution_context
- pass
-
-class ClearExceptionDataOnAbort(ExtRegistryEntry):
- _about_ = clear_exception_data_on_abort
-
- def compute_result_annotation(self):
- from rpython.annotator import model as annmodel
- return annmodel.s_None
-
- def specialize_call(self, hop):
- hop.exception_cannot_occur()
- return hop.genop('stm_clear_exception_data_on_abort', [],
- resulttype=lltype.Void)
-
-
- at dont_look_inside
def become_inevitable():
llop.stm_become_inevitable(lltype.Void)
diff --git a/rpython/rtyper/llinterp.py b/rpython/rtyper/llinterp.py
--- a/rpython/rtyper/llinterp.py
+++ b/rpython/rtyper/llinterp.py
@@ -974,7 +974,6 @@
op_stm_major_collect = _stm_not_implemented
op_stm_abort_and_retry = _stm_not_implemented
op_stm_become_inevitable = _stm_not_implemented
- op_stm_clear_exception_data_on_abort = _stm_not_implemented
# __________________________________________________________
# operations on addresses
diff --git a/rpython/rtyper/lltypesystem/lloperation.py b/rpython/rtyper/lltypesystem/lloperation.py
--- a/rpython/rtyper/lltypesystem/lloperation.py
+++ b/rpython/rtyper/lltypesystem/lloperation.py
@@ -449,8 +449,6 @@
'stm_get_adr_of_private_rev_num':LLOp(),
'stm_get_adr_of_read_barrier_cache':LLOp(),
- 'stm_clear_exception_data_on_abort':LLOp(),
-
# __________ address operations __________
'boehm_malloc': LLOp(),
diff --git a/rpython/translator/stm/funcgen.py b/rpython/translator/stm/funcgen.py
--- a/rpython/translator/stm/funcgen.py
+++ b/rpython/translator/stm/funcgen.py
@@ -43,7 +43,10 @@
def stm_initialize(funcgen, op):
- return 'stm_initialize();'
+ return '''stm_initialize();
+ stm_clear_on_abort(&pypy_g_ExcData.ed_exc_type,
+ sizeof(struct pypy_object0 *));
+ '''
def stm_finalize(funcgen, op):
return 'stm_finalize();'
@@ -227,13 +230,6 @@
def stm_major_collect(funcgen, op):
return 'stm_major_collect();'
-def stm_clear_exception_data_on_abort(funcgen, op):
- return """
- stm_clear_on_abort(&pypy_g_ExcData.ed_exc_type,
- sizeof(struct pypy_object0 *));
- """
-
-
def op_stm(funcgen, op):
func = globals()[op.opname]
More information about the pypy-commit
mailing list