Hi,

I’m attempting to use the JitHookInterface to implement something like the PyPy 
JIT hooks in pycket. However, I’m struggling to do anything other than print 
information to stdout.
 
From what I understand in pypy, the pypyjit.hooks.pypy_hooks object is 
instantiated, and then after the ObjSpace is initialised, it is assigned to 
pypy_hooks.space in setup_after_space_initialization. In my case, when I assign 
anything to an attribute of my JitHookInterface instance, translation blows up 
with 

[translation:ERROR] MissingRTypeAttribute: on_abort
[translation:ERROR] .. 
(rpython.jit.metainterp.pyjitpl:2224)MetaInterp.aborted_tracing
[translation:ERROR] .. block@59 with 2 exits(v1678)
[translation:ERROR] .. v1680 = getattr(v1679, ('on_abort'))


If any pycket people are reading this, what I’m trying to do at the moment is 
give a JitHookInterface instance access to the module table somehow.

Copying the pypy JIT hooks approach is not strictly necessary -  I’d be happy 
with being able to update anything from within a JitHookInterface callback 
which could then be accessed by application level code.

Obviously, my understanding of what’s going on here is lacking somewhat. If 
anyone could point me in the correct general direction, I’d be very grateful.

Best regards,
Magnus
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to