Пример #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)
Пример #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)
Пример #3
0
 def getraw():
     if we_are_translated():
         _threadlocalref_seeme(self)
         return llop.threadlocalref_get(FIELDTYPE, offset)
     else:
         return getattr(self.local, 'rawvalue', zero)
Пример #4
0
 def getraw():
     if we_are_translated():
         _threadlocalref_seeme(self)
         return llop.threadlocalref_get(FIELDTYPE, offset)
     else:
         return getattr(self.local, 'rawvalue', zero)
Пример #5
0
 def _ll_1_threadlocalref_get(TP, offset):
     return llop.threadlocalref_get(TP, offset)
Пример #6
0
 def _ll_1_threadlocalref_get(TP, offset):
     return llop.threadlocalref_get(TP, offset)
Пример #7
0
 def _ll_0_threadlocalref_getter():
     return llop.threadlocalref_get(rclass.OBJECTPTR, opaqueid)