예제 #1
0
파일: rthread.py 프로젝트: bukzor/pypy
 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
파일: rthread.py 프로젝트: bukzor/pypy
 def getraw():
     if we_are_translated():
         _threadlocalref_seeme(self)
         return llop.threadlocalref_get(FIELDTYPE, offset)
     else:
         return getattr(self.local, 'rawvalue', zero)
예제 #5
0
파일: support.py 프로젝트: sczfaker/pypy
 def _ll_1_threadlocalref_get(TP, offset):
     return llop.threadlocalref_get(TP, offset)
예제 #6
0
파일: support.py 프로젝트: Qointum/pypy
 def _ll_1_threadlocalref_get(TP, offset):
     return llop.threadlocalref_get(TP, offset)
예제 #7
0
파일: support.py 프로젝트: yuyichao/pypy
 def _ll_0_threadlocalref_getter():
     return llop.threadlocalref_get(rclass.OBJECTPTR, opaqueid)