EDIT: closing this in favor of !851 (merged)
The final goal of this branch is to ensure that we can use @specialize.memo() on the callbacks which are passed to rgc.register_custom_trace_hook.
This is needed for hpy, because we need to generate an HPy-compatible callback with the right C signature for every possible RPython callback.
In order to achieve that, we have to:
- ensure that the callbacks passed to gc.trace are functions and not bound methods
- add a 2nd argument to the callbacks, which is needed for a couple of them. Earlier it was not needed because the callbacks where bound methods and so the
self
was passed implicitly. - fix everything everywhere :)
Note that this branch is still tentative: before thinking of merging it, we will merge it to the branch hpy-0.0.4-hpyfields
. If it works, we will merge these changes to default
, and then to 3.8
as well.
--HG-- branch : gc-custom-trace-memo