Title: Call JIT code from the interpreter via a trampoline function, instead of inserting shim code in the jitted code · Issue #137959 · python/cpython · GitHub
Open Graph Title: Call JIT code from the interpreter via a trampoline function, instead of inserting shim code in the jitted code · Issue #137959 · python/cpython
X Title: Call JIT code from the interpreter via a trampoline function, instead of inserting shim code in the jitted code · Issue #137959 · python/cpython
Description: Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code. We should, instead use a trampoline function. A trampoline function would perform the sa...
Open Graph Description: Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code. We should, instead use a trampoline function. A ...
X Description: Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code. We should, instead use a trampoline function. A ...
Opengraph URL: https://github.com/python/cpython/issues/137959
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Call JIT code from the interpreter via a trampoline function, instead of inserting shim code in the jitted code","articleBody":"Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code.\n\nWe should, instead use a trampoline function. A trampoline function would perform the same job as the shim code, \nbut has many advantages:\n\n1. we would only need one for the entire process, instead of one per executor.\n2. we wouldn't need extra refcounting code to keep the shim alive as the trampoline function would always be live.\n3. we can simplify the tier1 -\u003e tier2 code in `ENTER_EXECUTOR` by having the trampoline manage much of the details\n4. we can use the same interface for the tier 2 interpreter, further simplifying the code\n5. we only need one entry into the JIT code. No need for `jit_side_entry`\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-137961\n* gh-140286\n* gh-141496\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2025-08-19T14:58:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/137959/cpython/issues/137959"}
| 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:883ab0af-b5ac-4d8e-282e-2caf24783272 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A320:28AE23:20C8AE6:2CCC8CE:696AC5AE |
| html-safe-nonce | 75df6a9f4cb1ebef815b5742413dd181818ee15360ad2440cd7100da84d74870 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzIwOjI4QUUyMzoyMEM4QUU2OjJDQ0M4Q0U6Njk2QUM1QUUiLCJ2aXNpdG9yX2lkIjoiODg1MDY5NDMzMzMyNTI5NzA3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3dfb33f51147debc1577f4fef7527905595c58c283bf41a6079065a3f02dd4c2 |
| hovercard-subject-tag | issue:3334709878 |
| 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/137959/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5a20ed20ee774964e2ec41d74d46e0ddc59ef07a728607744299dae2e939d12/python/cpython/issues/137959 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5a20ed20ee774964e2ec41d74d46e0ddc59ef07a728607744299dae2e939d12/python/cpython/issues/137959 |
| og:image:alt | Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code. We should, instead use a trampoline function. A ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markshannon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 986b6a1d774985095564e64d6963d11f094da3d0e2bfda2ab1a27d63662eb033 |
| 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 | 89ad2112b9c4e11df6a0c13c8c1f8eedd36b0977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width