Author: Armin Rigo <[email protected]>
Branch: portable-threadlocal
Changeset: r74720:030b8db86648
Date: 2014-11-26 00:00 +0100
http://bitbucket.org/pypy/pypy/changeset/030b8db86648/

Log:    Don't use GCREF here, but only OBJECTPTR. Avoids 'mark_opaque_ptr'
        in the JIT which disables minor optimizations.

diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -320,10 +320,11 @@
 
         def get():
             if we_are_translated():
-                from rpython.rtyper.annlowlevel import cast_gcref_to_instance
+                from rpython.rtyper import rclass
+                from rpython.rtyper.annlowlevel import 
cast_base_ptr_to_instance
                 _threadlocalref_seeme(self)
-                gcref = llop.threadlocalref_get(llmemory.GCREF, offset)
-                return cast_gcref_to_instance(Cls, gcref)
+                ptr = llop.threadlocalref_get(rclass.OBJECTPTR, offset)
+                return cast_base_ptr_to_instance(Cls, ptr)
             else:
                 return getattr(self.local, 'value', None)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to