Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 697
    • Issues 697
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and 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

Due to a massive storm of spam, registration on this instance now requires explicit administrator approval. Sorry for the added friction, we're also looking into automatic filtering options.

  • PyPyPyPy
  • pypypypy
  • Merge requests
  • !849

WIP: Refactor gc.trace in order to support HPy

  • Review changes

  • Download
  • 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
Reviewers
Request review from
Time tracking
Source branch: branch/gc-custom-trace-memo