Author: Armin Rigo <ar...@tunes.org>
Branch: stmgc-c7
Changeset: r69726:a89adf77a9e4
Date: 2014-03-05 14:05 +0100
http://bitbucket.org/pypy/pypy/changeset/a89adf77a9e4/

Log:    first small fixes

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
@@ -4,7 +4,7 @@
 from rpython.memory.gctransform.framework import ( TYPE_ID,
      BaseFrameworkGCTransformer, BaseRootWalker, sizeofaddr)
 from rpython.memory.gctypelayout import WEAKREF, WEAKREFPTR
-from rpython.rtyper import rmodel
+from rpython.rtyper import rmodel, llannotation
 
 
 class StmFrameworkGCTransformer(BaseFrameworkGCTransformer):
@@ -14,7 +14,7 @@
                                                       s_gc, s_typeid16)
         gc = self.gcdata.gc
         #
-        s_gcref = annmodel.SomePtr(llmemory.GCREF)
+        s_gcref = llannotation.SomePtr(llmemory.GCREF)
 
         self.malloc_weakref_ptr = self._getfn(
             GCClass.malloc_weakref.im_func,
@@ -25,7 +25,7 @@
             return gc.get_size(obj)
         pypy_stmcb_size.c_name = "pypy_stmcb_size"
         self.autoregister_ptrs.append(
-            getfn(pypy_stmcb_size, [annmodel.SomeAddress()],
+            getfn(pypy_stmcb_size, [llannotation.SomeAddress()],
                   annmodel.SomeInteger()))
         #
         def invokecallback(root, visit_fn):
@@ -34,8 +34,8 @@
             gc.trace(obj, invokecallback, visit_fn)
         pypy_stmcb_trace.c_name = "pypy_stmcb_trace"
         self.autoregister_ptrs.append(
-            getfn(pypy_stmcb_trace, [annmodel.SomeAddress(),
-                                     annmodel.SomePtr(GCClass.VISIT_FPTR)],
+            getfn(pypy_stmcb_trace, [llannotation.SomeAddress(),
+                                     llannotation.SomePtr(GCClass.VISIT_FPTR)],
                   annmodel.s_None))
 
     def build_root_walker(self):
diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -331,6 +331,7 @@
         from rpython.annotator import model as annmodel
         from rpython.rtyper.lltypesystem import rffi
         from rpython.rtyper.annlowlevel import MixLevelHelperAnnotator
+        from rpython.rtyper.llannotation import lltype_to_annotation
         entrypoint = self.entrypoint
         #
         def entrypoint_wrapper(argc, argv):
@@ -343,7 +344,7 @@
         #
         mix = MixLevelHelperAnnotator(self.translator.rtyper)
         args_s = [annmodel.SomeInteger(),
-                  annmodel.lltype_to_annotation(rffi.CCHARPP)]
+                  lltype_to_annotation(rffi.CCHARPP)]
         s_result = annmodel.SomeInteger()
         graph = mix.getgraph(entrypoint_wrapper, args_s, s_result)
         mix.finish()
diff --git a/rpython/translator/stm/jitdriver.py 
b/rpython/translator/stm/jitdriver.py
--- a/rpython/translator/stm/jitdriver.py
+++ b/rpython/translator/stm/jitdriver.py
@@ -2,7 +2,8 @@
 from rpython.flowspace.model import checkgraph, copygraph
 from rpython.flowspace.model import Block, Link, SpaceOperation, Constant
 from rpython.translator.unsimplify import split_block, varoftype
-from rpython.annotator.model import lltype_to_annotation, s_Int
+from rpython.annotator.model import s_Int
+from rpython.rtyper.llannotation import lltype_to_annotation
 from rpython.rtyper.annlowlevel import (MixLevelHelperAnnotator,
                                       cast_base_ptr_to_instance)
 from rpython.rlib import rstm
diff --git a/rpython/translator/stm/test/test_writebarrier.py 
b/rpython/translator/stm/test/test_writebarrier.py
--- a/rpython/translator/stm/test/test_writebarrier.py
+++ b/rpython/translator/stm/test/test_writebarrier.py
@@ -605,12 +605,12 @@
 external_release_gil = rffi.llexternal('external_release_gil', [], lltype.Void,
                                        _callable=lambda: None,
                                        random_effects_on_gcobjs=True,
-                                       threadsafe=True)   # GIL is released
+                                       releasegil=True)
 external_any_gcobj = rffi.llexternal('external_any_gcobj', [], lltype.Void,
                                      _callable=lambda: None,
                                      random_effects_on_gcobjs=True,
-                                     threadsafe=False)   # GIL is not released
+                                     releasegil=False)
 external_safest = rffi.llexternal('external_safest', [], lltype.Void,
                                   _callable=lambda: None,
                                   random_effects_on_gcobjs=False,
-                                  threadsafe=False)   # GIL is not released
+                                  releasegil=False)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to