[pypy-dev] lltype.Signed type in ThreadLocalReference

Manuel Jacob me at manueljacob.de
Tue Mar 21 20:03:55 EDT 2017


Hi John,

I can't say for sure (Armin probably knows better), but from the commit 
history it looks like this was specifically changed for the JIT.  With 
commit 5291d2692c2375a4105b43498188e749d4204dc8 the type was changed 
from llmemory.GCREF to lltype.Signed.

I'd recommend changing it back to llmemory.GCREF or rclass.OBJECTPTR in 
your fork and look whether you'll run into problems later.

-Manuel

On 2017-03-21 06:29, John Zhang wrote:
> Hi all,
> I’m wondering why rthread.ThreadLocalReference is initialised to have
> lltype.Signed type (rthread.py:387). If in get() it’s retrieved as
> rclass.OBJECTPTR, why not just set the type of the field to be
> OBJECTPTR? is this related to some specific optimisation?
> The problem I’m having is that in my back-end I cannot cast an integer
> to a GC-ed heap object reference (which the OBJECTPTR translates to),
> it can only be cast to a non-GC-ed memory object reference (a
> different memory space not part of the GC managed heap).
> Any ideas?
> 
> Regards,
> John Zhang
> 
> ------------------------------------------------------
> John Zhang
> Research Assistant
> Programming Languages, Design & Implementation Division
> Computer Systems Group
> ANU College of Engineering & Computer Science
> 108 North Rd
> The Australian National University
> Acton ACT 2601
> john.zhang at anu.edu.au<mailto:john.zhang at anu.edu.au>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev


More information about the pypy-dev mailing list