Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 674
    • Issues 674
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Merge requests
  • !849

WIP: Refactor gc.trace in order to support HPy

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Antonio Cuni requested to merge branch/gc-custom-trace-memo into branch/py3.8 Jun 20, 2022
  • Overview 0
  • Commits 520
  • Pipelines 3
  • Changes 520+

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:

  1. ensure that the callbacks passed to gc.trace are functions and not bound methods
  2. 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.
  3. 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

Edited Jun 29, 2022 by Antonio Cuni
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: branch/gc-custom-trace-memo