Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r70183:0b83cbb912b2
Date: 2014-03-23 08:37 +0100
http://bitbucket.org/pypy/pypy/changeset/0b83cbb912b2/

Log:    Next fix

diff --git a/rpython/memory/gctransform/stmframework.py 
b/rpython/memory/gctransform/stmframework.py
--- a/rpython/memory/gctransform/stmframework.py
+++ b/rpython/memory/gctransform/stmframework.py
@@ -6,6 +6,7 @@
 from rpython.memory.gctypelayout import WEAKREF, WEAKREFPTR
 from rpython.rtyper import rmodel, llannotation
 from rpython.translator.backendopt.support import var_needsgc
+from rpython.rlib import rstm
 
 
 class StmFrameworkGCTransformer(BaseFrameworkGCTransformer):
@@ -103,6 +104,12 @@
     def gct_gc_adr_of_root_stack_top(self, hop):
         hop.genop("stm_get_root_stack_top", [], resultvar=hop.spaceop.result)
 
+    def gct_get_write_barrier_failing_case(self, hop):
+        op = hop.spaceop
+        c_write_slowpath = rmodel.inputconst(
+            lltype.Signed, rstm.adr_write_slowpath)
+        hop.genop("cast_int_to_ptr", [c_write_slowpath], resultvar=op.result)
+
 ##    def _gct_with_roots_pushed(self, hop):
 ##        livevars = self.push_roots(hop)
 ##        self.default(hop)
diff --git a/rpython/rlib/rstm.py b/rpython/rlib/rstm.py
--- a/rpython/rlib/rstm.py
+++ b/rpython/rlib/rstm.py
@@ -12,6 +12,7 @@
 adr_nursery_top  = CDefinedIntSymbolic('(long)(&STM_SEGMENT->nursery_end)')
 adr_transaction_read_version = (
     CDefinedIntSymbolic('(long)(&STM_SEGMENT->transaction_read_version)'))
+adr_write_slowpath = CDefinedIntSymbolic('(long)(&_stm_write_slowpath)')
 
 
 def jit_stm_transaction_break_point():
diff --git a/rpython/translator/stm/test/test_ztranslated.py 
b/rpython/translator/stm/test/test_ztranslated.py
--- a/rpython/translator/stm/test/test_ztranslated.py
+++ b/rpython/translator/stm/test/test_ztranslated.py
@@ -392,6 +392,7 @@
             debug_print(objectmodel.current_object_addr_as_int(prebuilt))
             prebuilt.foo = 43
             debug_print(objectmodel.current_object_addr_as_int(prebuilt))
+            llop.get_write_barrier_failing_case(rffi.VOIDP)
             return 0
 
         t, cbuilder = self.compile(main)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to