python / python/cpython

Factor out the interpreter (PyEval_EvalFrameDefault) and helper functions into separate files

Ouverte
#150,950 0 commentaires 7 réactions 1 personne assignée Voir sur GitHub

@markshannon y travaille déjà.

Depuis le 5/6/2026.

interpreter-core type-refactor
Langage dominant
Python
Étoiles
77.2k
Forks
35.9k
Métriques de merge des PR
Métriques de PR en attente

Description

Currently ceval.c contains the interpreter and a lot of helper functions.

We should factor the interpreter into a separate file from everything else, because:

  • The interpreter is special. It is more of a template for various different interpreters than a normal function, having it in its own file makes it a lot easier to follow the various macros and #if conditions
  • It means that all helpers must have symbols (not be static) helping any JITs using PEP 523, such as PyTorch and CinderX
  • Having the interpreter in its own file makes it easier to build it differently for JIT, free-threading and other custom builds that might need to modify the interpreter, but don't want to have to mess with the rest of the VM
  • ceval.c is big and breaking it up makes it a bit easier to read the code

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.