Title: Add new type of executable to support external JITs · Issue #142598 · python/cpython · GitHub
Open Graph Title: Add new type of executable to support external JITs · Issue #142598 · python/cpython
X Title: Add new type of executable to support external JITs · Issue #142598 · python/cpython
Description: Feature or enhancement Proposal: #105727 introduced the ability to have different types of executables. During the discussion of that there was mention of potentially adding support for JITs to be able to plug in as well. There's a simil...
Open Graph Description: Feature or enhancement Proposal: #105727 introduced the ability to have different types of executables. During the discussion of that there was mention of potentially adding support for JITs to be ...
X Description: Feature or enhancement Proposal: #105727 introduced the ability to have different types of executables. During the discussion of that there was mention of potentially adding support for JITs to be ...
Opengraph URL: https://github.com/python/cpython/issues/142598
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add new type of executable to support external JITs","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nhttps://github.com/python/cpython/pull/105727 introduced the ability to have different types of executables. During the discussion of that there was mention of potentially adding support for JITs to be able to plug in as well. There's a similar disucssion of the idea over here: https://github.com/faster-cpython/ideas/issues/575\n\nThis extends the existing set of executors so that [PEP-523](https://peps.python.org/523) JITs can hook into the interpreter frames and create their own \"lightweight\" frames which live on the stack with some minimal amount of initialization.\n\nCurrently the initialization required is probably more than idea:\n\nin order for frames to appear complete they need to eagerly initialize instr_ptr\nSome things assume f_funcobj is initialized\nBecause the frames are currently FRAME_OWNED_BY_THREAD various things look at stackpointer.\nPresumably the next step after this PR would be to add a new frame owner which is complete but doesn't require these additional fields to be initialized.\n\nThe JIT executors are created with a fixed object that includes a callback to reify the frame, a code object, and an optional piece of state. The reifier is called in various places where the JIT needs to populate the frame - for example accessing globals, builtins, or instr_ptr. Currently the API just provides a single callback with no information on what's required but you could imagine we could have a finer grained control if it was desired - but reification of the frame is generally going to happen in the slow path so simplicity seems the best here.\n\nThe code object isn't strictly necessary but because profilers and other external introspection tools frequently want a minimal number of hops to determine a functions identity it's tracked here instead of making them head back to the function object and then read the code from there.\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\nhttps://github.com/python/cpython/pull/105727\nhttps://github.com/faster-cpython/ideas/issues/575\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-142550\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/DinoV","@type":"Person","name":"DinoV"},"datePublished":"2025-12-11T20:21:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/142598/cpython/issues/142598"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ca15b33-c066-7874-82d4-f32ae88f16b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9574:3856C7:2745CB:37178D:696A4255 |
| html-safe-nonce | f513ee24efadf748ad05d44753f338c766834bd8555506689b9543c0cd87a0cc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTc0OjM4NTZDNzoyNzQ1Q0I6MzcxNzhEOjY5NkE0MjU1IiwidmlzaXRvcl9pZCI6Ijg2OTIzOTEzNTIxNDcyNjQwODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9e558a811763f528fc0d12c62d6af8423249ea839bc7dc0be30ef46501c913bd |
| hovercard-subject-tag | issue:3720831297 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/142598/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dc0194773dee08d2e54b8f01d2ae3f0f793591ef6b6d430f47d7d417b768b419/python/cpython/issues/142598 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dc0194773dee08d2e54b8f01d2ae3f0f793591ef6b6d430f47d7d417b768b419/python/cpython/issues/142598 |
| og:image:alt | Feature or enhancement Proposal: #105727 introduced the ability to have different types of executables. During the discussion of that there was mention of potentially adding support for JITs to be ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DinoV |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width