Example #1
0
 def get():
     if we_are_translated():
         from rpython.rtyper import rclass
         from rpython.rtyper.annlowlevel import cast_base_ptr_to_instance
         _threadlocalref_seeme(self)
         ptr = llop.threadlocalref_get(rclass.OBJECTPTR, offset)
         return cast_base_ptr_to_instance(Cls, ptr)
     else:
         return getattr(self.local, 'value', None)
Example #2
0
 def get():
     if we_are_translated():
         from rpython.rtyper import rclass
         from rpython.rtyper.annlowlevel import cast_base_ptr_to_instance
         _threadlocalref_seeme(self)
         ptr = llop.threadlocalref_get(rclass.OBJECTPTR, offset)
         return cast_base_ptr_to_instance(Cls, ptr)
     else:
         return getattr(self.local, 'value', None)
Example #3
0
 def getraw():
     if we_are_translated():
         _threadlocalref_seeme(self)
         return llop.threadlocalref_get(FIELDTYPE, offset)
     else:
         return getattr(self.local, 'rawvalue', zero)
Example #4
0
 def getraw():
     if we_are_translated():
         _threadlocalref_seeme(self)
         return llop.threadlocalref_get(FIELDTYPE, offset)
     else:
         return getattr(self.local, 'rawvalue', zero)
Example #5
0
 def _ll_1_threadlocalref_get(TP, offset):
     return llop.threadlocalref_get(TP, offset)
Example #6
0
 def _ll_1_threadlocalref_get(TP, offset):
     return llop.threadlocalref_get(TP, offset)
Example #7
0
 def _ll_0_threadlocalref_getter():
     return llop.threadlocalref_get(rclass.OBJECTPTR, opaqueid)